From f9bdd238fb0f9992cd410c73212b8924345e4bc4 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Fri, 31 May 2024 17:43:39 +0200 Subject: [PATCH] more zfs services --- common.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/common.nix b/common.nix index c3ae795..e9d335b 100644 --- a/common.nix +++ b/common.nix @@ -109,6 +109,10 @@ in ]; }; + # ZFS services + services.zfs.autoScrub.enable = true; + services.zfs.trim.enable = true; + # enable fast dbus services.dbus.implementation = "broker"; @@ -425,6 +429,25 @@ in }; }; + # send mails on ZFS events + services.zfs.zed = { + settings = { + ZED_DEBUG_LOG = "/tmp/zed.debug.log"; + ZED_EMAIL_ADDR = [ "root" ]; + ZED_EMAIL_PROG = "${pkgs.msmtp}/bin/msmtp"; + ZED_EMAIL_OPTS = "@ADDRESS@"; + + ZED_NOTIFY_INTERVAL_SECS = 3600; + ZED_NOTIFY_VERBOSE = true; + + ZED_USE_ENCLOSURE_LEDS = true; + ZED_SCRUB_AFTER_RESILVER = true; + }; + + # this option does not work; will return error + enableMail = false; + }; + environment.etc = { "aliases" = { text = ''