diff options
Diffstat (limited to 'nixos/restic.nix')
-rw-r--r-- | nixos/restic.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/nixos/restic.nix b/nixos/restic.nix new file mode 100644 index 0000000..46f0631 --- /dev/null +++ b/nixos/restic.nix @@ -0,0 +1,31 @@ +{ + services.restic.backups = { + periodic = { + initialize = true; + environmentFile = "/root/.config/restic/env"; + repositoryFile = "/root/.config/restic/repository"; + passwordFile = "/root/.config/restic/password"; + + timerConfig = { + OnCalendar = "0/4:00"; + }; + + exclude = [ + "lost+found" + ]; + + paths = [ + "/home" + "/root" + ]; + + pruneOpts = [ + "--keep-hourly 6" + "--keep-daily 7" + "--keep-weekly 2" + "--keep-monthly 12" + "--keep-yearly 1" + ]; + }; + }; +} |