summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-07-30 19:30:23 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2017-07-30 19:30:23 +0200
commitc01e98c5e5c47b9578a948901a4307d1f710faa3 (patch)
treed09bbb7037cd8332e2c37d9ee9e5eb6536191baa
parent0dc4a6fa21ec216cc3145a5867025117eea8e8ce (diff)
downloadnixos-c01e98c5e5c47b9578a948901a4307d1f710faa3.tar
nixos-c01e98c5e5c47b9578a948901a4307d1f710faa3.tar.gz
nixos-c01e98c5e5c47b9578a948901a4307d1f710faa3.tar.bz2
nixos-c01e98c5e5c47b9578a948901a4307d1f710faa3.tar.xz
nixos-c01e98c5e5c47b9578a948901a4307d1f710faa3.zip
foldl?
-rw-r--r--custom/unit-status-mail.nix4
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;
5let 5let
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"]);
9in { 9in {
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";