summaryrefslogtreecommitdiff
path: root/common.nix
diff options
context:
space:
mode:
authorChristoph Cullmann <cullmann@kde.org>2024-05-31 17:43:39 +0200
committerChristoph Cullmann <cullmann@kde.org>2024-05-31 17:43:39 +0200
commitf9bdd238fb0f9992cd410c73212b8924345e4bc4 (patch)
treec2949d3d438cacf7899b8ad006ea3f96a4a73987 /common.nix
parent3ac6cd9dc19ab3f9cf84cb846eee8fc53febcc3d (diff)
more zfs services
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 = ''