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,7 +326,10 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.zfs.zed.settings = mkOption {
|
services.zfs.zed = {
|
||||||
|
enableMail = mkEnableOption "ZED's ability to send emails";
|
||||||
|
|
||||||
|
settings = mkOption {
|
||||||
type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
|
type = with types; attrsOf (oneOf [ str int bool (listOf str) ]);
|
||||||
example = literalExample ''
|
example = literalExample ''
|
||||||
{
|
{
|
||||||
@ -352,6 +355,7 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
@ -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