2025-03-09 20:30:33 +01:00
|
|
|
{
|
|
|
|
|
pkgs,
|
|
|
|
|
config,
|
|
|
|
|
...
|
|
|
|
|
}: {
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
restic
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
age.secrets.restic-password.rekeyFile = ../../secrets/hosts/homelab/restic-password.age;
|
|
|
|
|
age.secrets.restic-env.rekeyFile = ../../secrets/hosts/homelab/restic-env.age;
|
|
|
|
|
|
2025-04-23 00:02:00 +02:00
|
|
|
services.restic.backups.homelab = {
|
2025-03-09 20:30:33 +01:00
|
|
|
repository = "b2:fireproof-backup";
|
2025-04-23 00:02:00 +02:00
|
|
|
timerConfig = {
|
|
|
|
|
OnCalendar = "daily";
|
|
|
|
|
Persistent = true;
|
|
|
|
|
};
|
2025-03-09 20:30:33 +01:00
|
|
|
passwordFile = "${config.age.secrets.restic-password.path}";
|
|
|
|
|
environmentFile = "${config.age.secrets.restic-env.path}";
|
2025-04-23 00:02:00 +02:00
|
|
|
pruneOpts = [
|
|
|
|
|
"--keep-daily 7"
|
|
|
|
|
"--keep-weekly 5"
|
|
|
|
|
"--keep-monthly 12"
|
|
|
|
|
"--keep-yearly 75"
|
|
|
|
|
];
|
2025-03-09 20:30:33 +01:00
|
|
|
};
|
|
|
|
|
}
|