summaryrefslogtreecommitdiff
path: root/common.nix
diff options
context:
space:
mode:
Diffstat (limited to 'common.nix')
-rw-r--r--common.nix23
1 files changed, 23 insertions, 0 deletions
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 = ''