diff --git a/nixos/modules/services/monitoring/smartd.nix b/nixos/modules/services/monitoring/smartd.nix index c345ec48a018..8388527a268d 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} + 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 email in the emails' From: ... field. + ''; + }; + recipient = mkOption { default = "root"; type = types.str;