1
0

modules/backup: add restic cache

This commit is contained in:
clerie 2023-07-01 13:08:49 +02:00
parent 9dae541043
commit 3d13a0136f

View File

@ -41,6 +41,7 @@ let
export RESTIC_PASSWORD_FILE=${jobPasswordFile} export RESTIC_PASSWORD_FILE=${jobPasswordFile}
export RESTIC_REPOSITORY="rest:https://${targetUsername}:$(cat ${targetPasswordFile})@${targetOptions.serverName}${repoPath}" export RESTIC_REPOSITORY="rest:https://${targetUsername}:$(cat ${targetPasswordFile})@${targetOptions.serverName}${repoPath}"
export RESTIC_PROGRESS_FPS=0.1 export RESTIC_PROGRESS_FPS=0.1
export RESTIC_CACHE_DIR=/var/cache/restic
restic snapshots || restic init restic snapshots || restic init
@ -125,5 +126,8 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
systemd.services = backupServiceUnits; systemd.services = backupServiceUnits;
systemd.timers = backupServiceTimers; systemd.timers = backupServiceTimers;
systemd.tmpfiles.rules = [
"d /var/cache/restic - - - - -"
];
}; };
} }