diff options
author | sils <sils@sils.li> | 2024-01-06 20:55:56 +0100 |
---|---|---|
committer | sils <sils@sils.li> | 2024-01-07 23:18:04 +0100 |
commit | bba959118a19dad0a062f837f0dcad76fb497ec2 (patch) | |
tree | 9b684fede90ffa00f21b805485e07dbe72b8d33c /system/services | |
parent | feat(system/secrets): rename .tix files to .age (diff) | |
download | nixos-server-bba959118a19dad0a062f837f0dcad76fb497ec2.tar.gz nixos-server-bba959118a19dad0a062f837f0dcad76fb497ec2.zip |
feat(system): add restic
Diffstat (limited to 'system/services')
-rw-r--r-- | system/services/restic/default.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/system/services/restic/default.nix b/system/services/restic/default.nix new file mode 100644 index 0000000..3620540 --- /dev/null +++ b/system/services/restic/default.nix @@ -0,0 +1,25 @@ +{config, ...}: { + services.restic.backups = let + srvDir = "/srv"; + boxUser = "u384702-sub2"; + in { + storagebox = { + initialize = true; + paths = [ + srvDir + ]; + exclude = [ + ".snapshots" + ]; + extraBackupArgs = [ + "--exclude-if-present .nobackup" # Don't backup directory if it contains a file called ".nobackup" + "--verbose" # Spam log + ]; + passwordFile = config.age.secrets.resticpass.path; + extraOptions = [ + "rclone.program='ssh -p 23 ${boxUser}@${boxUser}.your-storagebox.de -i ${config.age.secrets.resticssh.path}'" + ]; + repository = "rclone: "; # There is only one repository served + }; + }; +} |