diff options
author | tmplt <tmplt@dragons.rocks> | 2020-06-24 20:47:44 +0200 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2020-08-05 14:26:48 -0700 |
commit | f9f48250fe1657f288a88c8ef519576a7b12a31b (patch) | |
tree | 69c10c24f4dc390d6f4119ad91bd99aac4ebc478 /nixos/modules/services/monitoring/smartd.nix | |
parent | 72ff02c99b7f281cbed490593244ed725c7c256d (diff) | |
download | nixpkgs-f9f48250fe1657f288a88c8ef519576a7b12a31b.tar nixpkgs-f9f48250fe1657f288a88c8ef519576a7b12a31b.tar.gz nixpkgs-f9f48250fe1657f288a88c8ef519576a7b12a31b.tar.bz2 nixpkgs-f9f48250fe1657f288a88c8ef519576a7b12a31b.tar.lz nixpkgs-f9f48250fe1657f288a88c8ef519576a7b12a31b.tar.xz nixpkgs-f9f48250fe1657f288a88c8ef519576a7b12a31b.tar.zst nixpkgs-f9f48250fe1657f288a88c8ef519576a7b12a31b.zip |
nixos/smartd: add option for notifiction email sender
Diffstat (limited to 'nixos/modules/services/monitoring/smartd.nix')
-rw-r--r-- | nixos/modules/services/monitoring/smartd.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/services/monitoring/smartd.nix b/nixos/modules/services/monitoring/smartd.nix index c345ec48a01..8388527a268 100644 --- a/nixos/modules/services/monitoring/smartd.nix +++ b/nixos/modules/services/monitoring/smartd.nix @@ -18,7 +18,7 @@ let ${optionalString nm.enable '' { ${pkgs.coreutils}/bin/cat << EOF - From: smartd on ${host} <root> + From: smartd on ${host} <${nm.sender}> To: undisclosed-recipients:; Subject: SMART error on $SMARTD_DEVICESTRING: $SMARTD_FAILTYPE @@ -129,6 +129,16 @@ in description = "Whenever to send e-mail notifications."; }; + sender = mkOption { + default = "root"; + example = "example@domain.tld"; + type = types.str; + description = '' + Sender of the notification messages. + Acts as the value of <literal>email</email> in the emails' <literal>From: ... <email></literal> field. + ''; + }; + recipient = mkOption { default = "root"; type = types.str; |