diff options
author | Cole Helbling <cole.e.helbling@outlook.com> | 2021-01-13 23:40:46 -0800 |
---|---|---|
committer | Cole Helbling <cole.e.helbling@outlook.com> | 2021-02-06 22:04:00 -0800 |
commit | 1ed5b6a285301a0ef17bbb8378ec43a6a79b3520 (patch) | |
tree | 86877eed033ae4fde9661b158d438e5db1891622 /nixos/modules | |
parent | a206194b4ec06da05f08c9b02eab4f574498df6b (diff) |
zfs: disable smartmontools mail functionality
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/tasks/filesystems/zfs.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index f153cce4c7269..59676e996785c 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -327,7 +327,9 @@ in }; services.zfs.zed = { - enableMail = mkEnableOption "ZED's ability to send emails"; + enableMail = mkEnableOption "ZED's ability to send emails" // { + default = cfgZfs.package.enableMail; + }; settings = mkOption { type = with types; attrsOf (oneOf [ str int bool (listOf str) ]); @@ -363,6 +365,14 @@ in (mkIf cfgZfs.enabled { assertions = [ { + assertion = cfgZED.enableMail -> cfgZfs.package.enableMail; + message = '' + To allow ZED to send emails, ZFS needs to be configured to enable + this. To do so, one must override the `zfs` package and set + `enableMail` to true. + ''; + } + { assertion = config.networking.hostId != null; message = "ZFS requires networking.hostId to be set"; } |