snowflake/hosts/sora/services/restic.nix

37 lines
879 B
Nix
Raw Normal View History

2024-02-08 12:04:15 -05:00
{ pkgs, config, ... }:
2023-12-31 09:24:32 -05:00
{
sops.secrets = {
2024-02-08 12:04:15 -05:00
restic-sora = {
sopsFile = ../../../secrets/restic/secrets.yaml;
};
sora-s3 = {
sopsFile = ../../../secrets/s3/secrets.yaml;
};
2023-12-31 09:24:32 -05:00
};
2024-02-08 12:04:15 -05:00
environment.systemPackages = [ pkgs.restic ];
2023-12-31 09:24:32 -05:00
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;
};
};
};
};
}