diff options
Diffstat (limited to 'custom')
-rw-r--r-- | custom/unit-status-mail.nix | 4 |
1 files 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; | |||
5 | let | 5 | let |
6 | cfg = config.systemd.status-mail; | 6 | cfg = config.systemd.status-mail; |
7 | 7 | ||
8 | serviceCfg = unitName: attrs: attrs // (setAttrByPath ["systemd" "services" unitName "onFailure"] ["unit-status-mail@%n.service"]); | 8 | serviceCfg = attrs: unitName: attrs // (setAttrByPath ["systemd" "services" unitName "onFailure"] ["unit-status-mail@%n.service"]); |
9 | in { | 9 | in { |
10 | options = { | 10 | options = { |
11 | systemd.status-mail = { | 11 | systemd.status-mail = { |
@@ -27,7 +27,7 @@ in { | |||
27 | }; | 27 | }; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | config = mkIf (cfg.onFailure != []) (foldr serviceCfg { | 30 | config = mkIf (cfg.onFailure != []) (foldl serviceCfg { |
31 | systemd.services."unit-status-mail@" = { | 31 | systemd.services."unit-status-mail@" = { |
32 | serviceConfig = { | 32 | serviceConfig = { |
33 | Type = "oneshot"; | 33 | Type = "oneshot"; |