Ensure borgbackup cache / config is persisted
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 32m28s
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 32m28s
This commit is contained in:
parent
1453a755c3
commit
71d1c3f9c2
@ -99,6 +99,8 @@ in
|
||||
};
|
||||
|
||||
borgbackup.jobs.vaultwarden = {
|
||||
readWritePaths = [ "/var/lib/borgbackup" "/var/cache/borgbackup" ];
|
||||
|
||||
paths = [ vwData ];
|
||||
repo = "zh2855@zh2855.rsync.net:borg/vaultwarden2";
|
||||
doInit = true;
|
||||
|
@ -123,6 +123,7 @@ in
|
||||
within = "12H";
|
||||
hourly = 48;
|
||||
};
|
||||
readWritePaths = [ "/var/lib/borgbackup" "/var/cache/borgbackup" ];
|
||||
|
||||
# Avoid Minecraft poking the files while we back up
|
||||
preHook = rconCommand "save-off";
|
||||
|
@ -540,6 +540,20 @@ in
|
||||
];
|
||||
})
|
||||
(persistSimpleSvc "octoprint")
|
||||
(mkIf (config.services.borgbackup.jobs != { }) {
|
||||
my.tmproot.persistence.config.directories = [
|
||||
"/var/lib/borgbackup"
|
||||
"/var/cache/borgbackup"
|
||||
];
|
||||
|
||||
services.borgbackup.package = pkgs.borgbackup.overrideAttrs (o: {
|
||||
makeWrapperArgs = o.makeWrapperArgs ++ [
|
||||
"--set-default BORG_BASE_DIR /var/lib/borgbackup"
|
||||
"--set-default BORG_CONFIG_DIR /var/lib/borgbackup/config"
|
||||
"--set-default BORG_CACHE_DIR /var/cache/borgbackup"
|
||||
];
|
||||
});
|
||||
})
|
||||
]))
|
||||
]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user