feat: add restic for backup, update, remove planify again
This commit is contained in:
parent
bdcf0458bb
commit
215dcbf5ae
11 changed files with 200 additions and 29 deletions
34
hosts/lambdaos/restic.nix
Normal file
34
hosts/lambdaos/restic.nix
Normal 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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue