nixos/zfs: make zed mail optional
"zed does not need the ability to send email by default" --Eelco
This commit is contained in:
parent
c7942b0f8b
commit
370df31f1c
@ -326,30 +326,34 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.zfs.zed.settings = mkOption {
|
services.zfs.zed = {
|
||||||
type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
|
enableMail = mkEnableOption "ZED's ability to send emails";
|
||||||
example = literalExample ''
|
|
||||||
{
|
|
||||||
ZED_DEBUG_LOG = "/tmp/zed.debug.log";
|
|
||||||
|
|
||||||
ZED_EMAIL_ADDR = [ "root" ];
|
settings = mkOption {
|
||||||
ZED_EMAIL_PROG = "mail";
|
type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
|
||||||
ZED_EMAIL_OPTS = "-s '@SUBJECT@' @ADDRESS@";
|
example = literalExample ''
|
||||||
|
{
|
||||||
|
ZED_DEBUG_LOG = "/tmp/zed.debug.log";
|
||||||
|
|
||||||
ZED_NOTIFY_INTERVAL_SECS = 3600;
|
ZED_EMAIL_ADDR = [ "root" ];
|
||||||
ZED_NOTIFY_VERBOSE = false;
|
ZED_EMAIL_PROG = "mail";
|
||||||
|
ZED_EMAIL_OPTS = "-s '@SUBJECT@' @ADDRESS@";
|
||||||
|
|
||||||
ZED_USE_ENCLOSURE_LEDS = true;
|
ZED_NOTIFY_INTERVAL_SECS = 3600;
|
||||||
ZED_SCRUB_AFTER_RESILVER = false;
|
ZED_NOTIFY_VERBOSE = false;
|
||||||
}
|
|
||||||
'';
|
|
||||||
description = ''
|
|
||||||
ZFS Event Daemon /etc/zfs/zed.d/zed.rc content
|
|
||||||
|
|
||||||
See
|
ZED_USE_ENCLOSURE_LEDS = true;
|
||||||
<citerefentry><refentrytitle>zed</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
ZED_SCRUB_AFTER_RESILVER = false;
|
||||||
for details on ZED and the scripts in /etc/zfs/zed.d to find the possible variables
|
}
|
||||||
'';
|
'';
|
||||||
|
description = ''
|
||||||
|
ZFS Event Daemon /etc/zfs/zed.d/zed.rc content
|
||||||
|
|
||||||
|
See
|
||||||
|
<citerefentry><refentrytitle>zed</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
|
for details on ZED and the scripts in /etc/zfs/zed.d to find the possible variables
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -437,7 +441,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
services.zfs.zed.settings = {
|
services.zfs.zed.settings = {
|
||||||
ZED_EMAIL_PROG = mkDefault "${pkgs.mailutils}/bin/mail";
|
ZED_EMAIL_PROG = mkIf cfgZED.enableMail (mkDefault "${pkgs.mailutils}/bin/mail");
|
||||||
PATH = lib.makeBinPath [
|
PATH = lib.makeBinPath [
|
||||||
cfgZfs.package
|
cfgZfs.package
|
||||||
pkgs.coreutils
|
pkgs.coreutils
|
||||||
|
Loading…
x
Reference in New Issue
Block a user