feat: add restic for backup, update, remove planify again

This commit is contained in:
Noa Aarts 2024-09-04 07:50:11 +02:00
parent bdcf0458bb
commit 215dcbf5ae
Signed by: noa
GPG key ID: 1850932741EFF672
11 changed files with 200 additions and 29 deletions

34
hosts/lambdaos/restic.nix Normal file
View file

@ -0,0 +1,34 @@
{ config, ... }: {
# configure agenix secrets
age.secrets = {
"restic/env".file = ../../secrets/restic/env.age;
"restic/repo".file = ../../secrets/restic/repo.age;
"restic/password".file = ../../secrets/restic/password.age;
};
# configure restic backup services
services.restic.backups = {
daily = {
timerConfig = {
OnCalendar = "14:00";
RandomizedDelaySec = "1h";
};
initialize = true;
environmentFile = config.age.secrets."restic/env".path;
repositoryFile = config.age.secrets."restic/repo".path;
passwordFile = config.age.secrets."restic/password".path;
paths = [
"${config.users.users.noa.home}/Pictures/library/library/"
];
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 5"
"--keep-monthly 12"
];
};
};
}