diff options
Diffstat (limited to 'custom')
-rw-r--r-- | custom/borgbackup.nix | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/custom/borgbackup.nix b/custom/borgbackup.nix index dd350997..c111c414 100644 --- a/custom/borgbackup.nix +++ b/custom/borgbackup.nix | |||
@@ -63,10 +63,10 @@ in { | |||
63 | }; | 63 | }; |
64 | }) (flatten (mapAttrsToList (target: tCfg: map (path: { inherit target path; }) tCfg.paths) cfg.targets))); | 64 | }) (flatten (mapAttrsToList (target: tCfg: map (path: { inherit target path; }) tCfg.paths) cfg.targets))); |
65 | 65 | ||
66 | systemd.services = listToAttrs (map (target: nameValuePair "borgbackup-${target}@" (let | 66 | systemd.services = mapAttrs' (target: tCfg: nameValuePair "borgbackup-${target}@" (let |
67 | deps = flatten [ | 67 | deps = flatten [ |
68 | optional (cfg.snapshots == "btrfs") "btrfs-snapshot@%i.service" | 68 | optional (cfg.snapshots == "btrfs") "btrfs-snapshot@%i.service" |
69 | optional network "network-online.target" | 69 | optional tCfg.network "network-online.target" |
70 | ]; | 70 | ]; |
71 | in { | 71 | in { |
72 | bindsTo = deps; | 72 | bindsTo = deps; |
@@ -96,6 +96,6 @@ in { | |||
96 | IOSchedulingPriority = 7; | 96 | IOSchedulingPriority = 7; |
97 | SuccessExitStatus = [1 2]; | 97 | SuccessExitStatus = [1 2]; |
98 | }; | 98 | }; |
99 | })) (attrNames cfg.targets)); | 99 | })) cfg.targets); |
100 | }; | 100 | }; |
101 | } | 101 | } |