extend the prune service
This commit is contained in:
parent
59ef08b93f
commit
b9105eb9f0
|
@ -15,12 +15,18 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.prune-restic = {
|
systemd.services.prune-restic = {
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig = {
|
||||||
after = "restic-backups-${custom.username}.service";
|
User = "restic";
|
||||||
|
Type = "oneshot";
|
||||||
|
CacheDirectory = "prune-restic";
|
||||||
|
CacheDirectoryMode = "0700";
|
||||||
|
};
|
||||||
|
after = [ "restic-backups-${custom.username}.service" ];
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.restic}/bin/restic \
|
${pkgs.restic}/bin/restic \
|
||||||
--repo ${repository} \
|
--repo ${repository} \
|
||||||
--password-file "/home/${custom.username}/.nixos/secrets/passwords/restic.key" \
|
--password-file "/home/${custom.username}/.nixos/secrets/passwords/restic.key" \
|
||||||
|
--cache-dir="/var/cache/prune-restic" \
|
||||||
forget \
|
forget \
|
||||||
--keep-daily 7 \
|
--keep-daily 7 \
|
||||||
--keep-weekly 5 \
|
--keep-weekly 5 \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user