nixos/hosts/architect/backup.nix
2022-02-15 12:03:05 +01:00

24 lines
537 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" ];
pruneOpts = [
"--keep-daily 45"
"--keep-weekly 12"
"--keep-monthly 12"
"--keep-yearly 3"
];
timerConfig = {
OnCalendar = "monday 00:05";
RandomizedDelaySec = "2h";
};
};
};
}