diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2017-12-17 04:20:59 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2017-12-17 04:20:59 +0100 |
commit | 4ab489ef78c840244442a44faa0d7a571bc910d5 (patch) | |
tree | 2de443f0436621c7dce5b63d99d6c047f945d70c /custom | |
parent | 39d9df794b6968aa3168ad1a3584a9b93e2e5329 (diff) | |
download | nixos-4ab489ef78c840244442a44faa0d7a571bc910d5.tar nixos-4ab489ef78c840244442a44faa0d7a571bc910d5.tar.gz nixos-4ab489ef78c840244442a44faa0d7a571bc910d5.tar.bz2 nixos-4ab489ef78c840244442a44faa0d7a571bc910d5.tar.xz nixos-4ab489ef78c840244442a44faa0d7a571bc910d5.zip |
…
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 | } |