nixos/hosts/architect/backup.nix
Giulio De Pasquale 184e6fafce Backup /services
2022-10-11 21:29:41 +02:00

24 lines
549 B
Nix

{ config, lib, ... }:
{
services.restic.backups = {
backblaze = {
initialize = true;
passwordFile = "/secrets/restic/data.key";
environmentFile = "/secrets/restic/credentials.txt";
repository = "b2:architect:/";
paths = [ "/var/lib" "/secrets" "/services" ];
pruneOpts = [
"--keep-daily 45"
"--keep-weekly 12"
"--keep-monthly 12"
"--keep-yearly 3"
];
timerConfig = {
OnCalendar = "monday 03:00";
RandomizedDelaySec = "1h";
};
};
};
}