infra/pastila/backups.nix
2024-05-28 23:24:31 +02:00

38 lines
No EOL
641 B
Nix

{ config, lib, pkgs, ... }:
{
services.restic.backups."borgbase" = {
paths = [
"/home"
"/root"
"/etc/secrets"
"/var"
"/srv"
];
exclude = [
"/var/cache"
"/home/*/.cache"
"/var/log"
".opam"
"/home/armael/TorrentsData"
];
timerConfig = {
OnCalendar = "daily";
RandomizedDelaySec = "5h";
Persistent = true;
};
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 5"
"--keep-monthly 6"
"--keep-yearly 3"
];
repositoryFile = /etc/secrets/restic/repo;
passwordFile = "/etc/secrets/restic/password";
};
}