0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-13 13:40:28 +03:00

nixos/smartd: add option for notifiction email sender

This commit is contained in:
tmplt 2020-06-24 20:47:44 +02:00 committed by Jon
parent 72ff02c99b
commit f9f48250fe

View file

@ -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;