{config, lib, ...} : { services.restic.backups = { local = { initialize = true; passwordFile = "/etc/restic/local.key"; repository = "/backup"; paths = [ "/" ]; extraBackupArgs = [ "-x" # same filesystem "-e /nix" ]; pruneOpts = [ "--keep-daily 45" "--keep-weekly 12" "--keep-monthly 12" "--keep-yearly 3" ]; timerConfig = { OnCalendar = "00:05"; RandomizedDelaySec = "5h"; }; }; }; }