snowflake/hosts/sora/services/restic.nix

36 lines
859 B
Nix
Raw Permalink Normal View History

2023-12-31 09:24:32 -05:00
{
pkgs,
config,
...
}: {
sops.secrets = {
restic-sora = {sopsFile = ../../../secrets/restic/secrets.yaml;};
sora-s3 = {sopsFile = ../../../secrets/s3/secrets.yaml;};
2023-12-31 09:24:32 -05:00
};
environment.systemPackages = [pkgs.restic];
services.restic = {
backups = {
sora = {
user = "root";
paths = [
2023-12-31 12:51:49 -05:00
"/var/lib/private/uptime-kuma"
"/var/lib/private/ntfy-sh"
2023-12-31 09:24:32 -05:00
];
pruneOpts = [
2023-12-31 12:51:49 -05:00
"--keep-daily=7"
2023-12-31 09:24:32 -05:00
"--keep-weekly=6"
"--keep-monthly=5"
];
2024-01-15 01:51:33 -05:00
repository = "s3:https://s3.flake.sh/restic-sora";
2023-12-31 09:24:32 -05:00
initialize = true;
2023-12-31 12:51:49 -05:00
passwordFile = config.sops.secrets.restic-sora.path;
2024-01-15 01:51:33 -05:00
environmentFile = config.sops.secrets.sora-s3.path;
2023-12-31 09:24:32 -05:00
timerConfig = {
OnCalendar = "daily";
Persistent = true;
};
};
};
};
}