summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
Diffstat (limited to 'custom')
-rw-r--r--custom/borgbackup.nix11
1 files changed, 4 insertions, 7 deletions
diff --git a/custom/borgbackup.nix b/custom/borgbackup.nix
index c67287a4..3871af0a 100644
--- a/custom/borgbackup.nix
+++ b/custom/borgbackup.nix
@@ -104,13 +104,7 @@ in {
104 wantedBy = [ "timers.target" ]; 104 wantedBy = [ "timers.target" ];
105 }; 105 };
106 106
107 systemd.slices."system-borgbackup" = { 107 systemd.slices."system-borgbackup" = {};
108 sliceConfig = {
109 Nice = 15;
110 IOSchedulingClass = 2;
111 IOSchedulingPriority = 7;
112 };
113 };
114 108
115 systemd.timers = (listToAttrs (map ({ target, path, tCfg }: nameValuePair "borgbackup-${target}@${systemdPath path}" { 109 systemd.timers = (listToAttrs (map ({ target, path, tCfg }: nameValuePair "borgbackup-${target}@${systemdPath path}" {
116 requiredBy = [ "timers-borg.target" ]; 110 requiredBy = [ "timers-borg.target" ];
@@ -171,6 +165,9 @@ in {
171 serviceConfig = { 165 serviceConfig = {
172 Type = "oneshot"; 166 Type = "oneshot";
173 WorkingDirectory = if (cfg.snapshots == null) then "%I" else (if (cfg.snapshots == "lvm") then "${mountPoint}/${withPrefix "%I"}" else "${mountPoint}/${withPrefix "%i"}"); 167 WorkingDirectory = if (cfg.snapshots == null) then "%I" else (if (cfg.snapshots == "lvm") then "${mountPoint}/${withPrefix "%I"}" else "${mountPoint}/${withPrefix "%i"}");
168 Nice = 15;
169 IOSchedulingClass = 2;
170 IOSchedulingPriority = 7;
174 SuccessExitStatus = [1 2]; 171 SuccessExitStatus = [1 2];
175 Slice = "system-borgbackup.slice"; 172 Slice = "system-borgbackup.slice";
176 }; 173 };