snowflake/hosts/kariru/services/restic.nix

35 lines
791 B
Nix
Raw Permalink Normal View History

2023-12-31 12:51:49 -05:00
{
pkgs,
config,
...
}: {
sops.secrets.restic-kariru = {sopsFile = ../../../secrets/restic/secrets.yaml;};
2023-12-31 12:51:49 -05:00
environment.systemPackages = [pkgs.restic];
services.restic = {
backups = {
kariru = {
user = "root";
paths = [
"/var/lib/radarr"
"/var/lib/sonarr"
"/var/lib/whisparr"
"/var/lib/private/prowlarr"
];
pruneOpts = [
"--keep-daily=7"
"--keep-weekly=6"
"--keep-monthly=5"
];
initialize = true;
repository = "/nas/restic";
passwordFile = config.sops.secrets.restic-kariru.path;
timerConfig = {
OnCalendar = "daily";
RandomizedDelaySec = "20m";
Persistent = true;
};
};
};
};
}