summaryrefslogtreecommitdiff
path: root/custom/unit-status-mail.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2017-07-30 19:27:36 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2017-07-30 19:27:36 +0200
commitc68361bf7140424e50608b490fb8775516ea9a24 (patch)
tree35e095975de61947fa1a7c6fb855a40fc26b1fd5 /custom/unit-status-mail.nix
parentd036121c599433a4a97be57f6b30c860f3b7d57d (diff)
downloadnixos-c68361bf7140424e50608b490fb8775516ea9a24.tar
nixos-c68361bf7140424e50608b490fb8775516ea9a24.tar.gz
nixos-c68361bf7140424e50608b490fb8775516ea9a24.tar.bz2
nixos-c68361bf7140424e50608b490fb8775516ea9a24.tar.xz
nixos-c68361bf7140424e50608b490fb8775516ea9a24.zip
Test
Diffstat (limited to 'custom/unit-status-mail.nix')
-rw-r--r--custom/unit-status-mail.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/custom/unit-status-mail.nix b/custom/unit-status-mail.nix
index e9007d55..355d1cf7 100644
--- a/custom/unit-status-mail.nix
+++ b/custom/unit-status-mail.nix
@@ -28,7 +28,7 @@ in {
28 }; 28 };
29 }; 29 };
30 30
31 config = mkIf (cfg.onFailure != []) ({ 31 config = mkIf (cfg.onFailure != []) {
32 systemd.services."unit-status-mail@" = { 32 systemd.services."unit-status-mail@" = {
33 serviceConfig = { 33 serviceConfig = {
34 Type = "oneshot"; 34 Type = "oneshot";
@@ -36,7 +36,7 @@ in {
36 scriptArgs = "%I \"Hostname: %H\" \"Machine-ID: %m\" \"Boot-ID: %b\""; 36 scriptArgs = "%I \"Hostname: %H\" \"Machine-ID: %m\" \"Boot-ID: %b\"";
37 script = '' 37 script = ''
38 #!${pkgs.stdenv.shell} 38 #!${pkgs.stdenv.shell}
39 MAILTO="root" 39 MAILTO="${recipient}"
40 MAILFROM="unit-status-mailer" 40 MAILFROM="unit-status-mailer"
41 UNIT=$1 41 UNIT=$1
42 42
@@ -59,5 +59,5 @@ in {
59 EOF 59 EOF
60 ''; 60 '';
61 }; 61 };
62 } // systemdCfg); 62 };
63} 63}