infra/pastila/backups.nix

40 lines
692 B
Nix
Raw Normal View History

2024-05-28 17:56:03 +00:00
{ config, lib, pkgs, ... }:
{
2024-11-29 18:41:45 +00:00
services.restic.backups."infracoll" = {
2024-05-28 17:56:03 +00:00
paths = [
"/home"
"/root"
"/etc/secrets"
"/var"
"/srv"
];
exclude = [
"/var/cache"
"/home/*/.cache"
"/var/log"
".opam"
2024-05-28 21:24:31 +00:00
"/home/armael/TorrentsData"
2024-05-28 17:56:03 +00:00
];
timerConfig = {
OnCalendar = "daily";
RandomizedDelaySec = "5h";
Persistent = true;
};
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 5"
"--keep-monthly 6"
"--keep-yearly 3"
];
repositoryFile = /etc/secrets/restic/repo;
passwordFile = "/etc/secrets/restic/password";
2024-11-29 18:41:45 +00:00
environmentFile = "/etc/secrets/restic/env";
2024-05-28 17:56:03 +00:00
};
2024-11-29 18:41:45 +00:00
}