summaryrefslogtreecommitdiff
path: root/custom
diff options
context:
space:
mode:
Diffstat (limited to 'custom')
-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}