From acc28d927869b4dd38a5b9281e98976989f4b96e Mon Sep 17 00:00:00 2001 From: blake Date: Sun, 19 Oct 2025 14:44:35 -0500 Subject: [PATCH] add email notifs to zfs and smart --- modules/holocron/zfs/default.nix | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/modules/holocron/zfs/default.nix b/modules/holocron/zfs/default.nix index 4794345..88c69f1 100644 --- a/modules/holocron/zfs/default.nix +++ b/modules/holocron/zfs/default.nix @@ -19,16 +19,31 @@ in { boot.supportedFilesystems = ["zfs"]; # enable smart monitoring - services.smartd.enable = true; + services.smartd = { + enable = true; + notifications.mail = { + enable = true; + sender = "zfs@snowbelle.lan"; + }; + }; # enable zfs services.zfs = { autoScrub.enable = true; autoScrub.interval = "weekly"; + # email notifs + zed = { + enableMail = true; + settings = { + ZED_EMAIL_ADDR = ["root"]; + # send notification if scrub succeeds + ZED_NOTIFY_VERBOSE = true; + }; + }; }; # install userspace tools for acl's - environment.systemPackages = with pkgs; [ nfs-utils ]; + environment.systemPackages = with pkgs; [smartmontools]; fileSystems."/holocron" = { device = "holocron";