added basic borg backup
This commit is contained in:
parent
e0c105b806
commit
956458f2a9
4 changed files with 27 additions and 0 deletions
24
modules/borg.nix
Normal file
24
modules/borg.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
services.borgbackup.jobs.default = {
|
||||||
|
paths = [
|
||||||
|
"/etc"
|
||||||
|
"/home"
|
||||||
|
"/root"
|
||||||
|
"/var"
|
||||||
|
];
|
||||||
|
exclude = [
|
||||||
|
"*/.cache"
|
||||||
|
"/home/*/build"
|
||||||
|
"/var/log"
|
||||||
|
];
|
||||||
|
repo = "borg@haus.mc-fucker.cool:/mnt/sdf1/borg/${config.networking.hostName}";
|
||||||
|
compression = "zstd";
|
||||||
|
encryption.mode = "none";
|
||||||
|
environment.BORG_RSH = "ssh -o 'StrictHostKeyChecking=no' -i /root/.ssh/id_borg";
|
||||||
|
extraCreateArgs = "--verbose --stats";
|
||||||
|
startAt = "03:00";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim: set et ts=2 sw=2 ai:
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./modules/generic.nix
|
./modules/generic.nix
|
||||||
./modules/invidious.nix
|
./modules/invidious.nix
|
||||||
|
./modules/borg.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
#nixpkgs.overlays = [
|
#nixpkgs.overlays = [
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./modules/generic.nix
|
./modules/generic.nix
|
||||||
./modules/ceph-common.nix
|
./modules/ceph-common.nix
|
||||||
|
./modules/borg.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
services.ceph = {
|
services.ceph = {
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
./modules/generic.nix
|
./modules/generic.nix
|
||||||
./modules/headscale.nix
|
./modules/headscale.nix
|
||||||
./modules/ceph-common.nix
|
./modules/ceph-common.nix
|
||||||
|
./modules/borg.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
services.ceph = {
|
services.ceph = {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue