snowflake/hosts/sora/services/restic.nix
notohh 3c182f558b
All checks were successful
flake check / check (push) Successful in 4m33s
fmt check / check (push) Successful in 49s
sora: update restic
2024-01-15 01:51:33 -05:00

40 lines
883 B
Nix

{
pkgs,
config,
...
}: {
sops.secrets = {
restic-sora = {
sopsFile = ../../../secrets/restic/secrets.yaml;
};
sora-s3 = {
sopsFile = ../../../secrets/s3/secrets.yaml;
};
};
environment.systemPackages = [pkgs.restic];
services.restic = {
backups = {
sora = {
user = "root";
paths = [
"/var/lib/private/uptime-kuma"
"/var/lib/private/ntfy-sh"
];
pruneOpts = [
"--keep-daily=7"
"--keep-weekly=6"
"--keep-monthly=5"
];
repository = "s3:https://s3.flake.sh/restic-sora";
initialize = true;
passwordFile = config.sops.secrets.restic-sora.path;
environmentFile = config.sops.secrets.sora-s3.path;
timerConfig = {
OnCalendar = "daily";
Persistent = true;
};
};
};
};
}