From 4ab489ef78c840244442a44faa0d7a571bc910d5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 17 Dec 2017 04:20:59 +0100 Subject: =?UTF-8?q?=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- custom/borgbackup.nix | 6 +++--- 1 file 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 { }; }) (flatten (mapAttrsToList (target: tCfg: map (path: { inherit target path; }) tCfg.paths) cfg.targets))); - systemd.services = listToAttrs (map (target: nameValuePair "borgbackup-${target}@" (let + systemd.services = mapAttrs' (target: tCfg: nameValuePair "borgbackup-${target}@" (let deps = flatten [ optional (cfg.snapshots == "btrfs") "btrfs-snapshot@%i.service" - optional network "network-online.target" + optional tCfg.network "network-online.target" ]; in { bindsTo = deps; @@ -96,6 +96,6 @@ in { IOSchedulingPriority = 7; SuccessExitStatus = [1 2]; }; - })) (attrNames cfg.targets)); + })) cfg.targets); }; } -- cgit v1.2.3