From c01e98c5e5c47b9578a948901a4307d1f710faa3 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 30 Jul 2017 19:30:23 +0200 Subject: foldl? --- custom/unit-status-mail.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/custom/unit-status-mail.nix b/custom/unit-status-mail.nix index e43706ea..13717ce9 100644 --- a/custom/unit-status-mail.nix +++ b/custom/unit-status-mail.nix @@ -5,7 +5,7 @@ with lib; let cfg = config.systemd.status-mail; - serviceCfg = unitName: attrs: attrs // (setAttrByPath ["systemd" "services" unitName "onFailure"] ["unit-status-mail@%n.service"]); + serviceCfg = attrs: unitName: attrs // (setAttrByPath ["systemd" "services" unitName "onFailure"] ["unit-status-mail@%n.service"]); in { options = { systemd.status-mail = { @@ -27,7 +27,7 @@ in { }; }; - config = mkIf (cfg.onFailure != []) (foldr serviceCfg { + config = mkIf (cfg.onFailure != []) (foldl serviceCfg { systemd.services."unit-status-mail@" = { serviceConfig = { Type = "oneshot"; -- cgit v1.2.3