mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
nixos/smartd: add option for notifiction email sender
This commit is contained in:
parent
72ff02c99b
commit
f9f48250fe
1 changed files with 11 additions and 1 deletions
|
@ -18,7 +18,7 @@ let
|
||||||
${optionalString nm.enable ''
|
${optionalString nm.enable ''
|
||||||
{
|
{
|
||||||
${pkgs.coreutils}/bin/cat << EOF
|
${pkgs.coreutils}/bin/cat << EOF
|
||||||
From: smartd on ${host} <root>
|
From: smartd on ${host} <${nm.sender}>
|
||||||
To: undisclosed-recipients:;
|
To: undisclosed-recipients:;
|
||||||
Subject: SMART error on $SMARTD_DEVICESTRING: $SMARTD_FAILTYPE
|
Subject: SMART error on $SMARTD_DEVICESTRING: $SMARTD_FAILTYPE
|
||||||
|
|
||||||
|
@ -129,6 +129,16 @@ in
|
||||||
description = "Whenever to send e-mail notifications.";
|
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 {
|
recipient = mkOption {
|
||||||
default = "root";
|
default = "root";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue