From 44463eaa988e22a0e970c4e9a1b47db3f54356bd Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 26 Sep 2018 14:12:43 +0200 Subject: ... --- custom/borgbackup.nix | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'custom') 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 { wantedBy = [ "timers.target" ]; }; - systemd.slices."system-borgbackup" = { - sliceConfig = { - Nice = 15; - IOSchedulingClass = 2; - IOSchedulingPriority = 7; - }; - }; + systemd.slices."system-borgbackup" = {}; systemd.timers = (listToAttrs (map ({ target, path, tCfg }: nameValuePair "borgbackup-${target}@${systemdPath path}" { requiredBy = [ "timers-borg.target" ]; @@ -171,6 +165,9 @@ in { serviceConfig = { Type = "oneshot"; WorkingDirectory = if (cfg.snapshots == null) then "%I" else (if (cfg.snapshots == "lvm") then "${mountPoint}/${withPrefix "%I"}" else "${mountPoint}/${withPrefix "%i"}"); + Nice = 15; + IOSchedulingClass = 2; + IOSchedulingPriority = 7; SuccessExitStatus = [1 2]; Slice = "system-borgbackup.slice"; }; -- cgit v1.2.3