1 { pkgs, lib, config, ... }:
3 # The 32-bit host id of the machine, formatted as 8 hexadecimal characters.
4 # You should try to make this id unique among your machines.
5 # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
6 networking.hostId = "69c40b03";
8 # none is the recommended elevator with ZFS (which has its own I/O scheduler)
9 # and/or for SSD, whereas HDD could use mq-deadline.
10 services.udev.extraRules = ''
11 # set none scheduler for non-rotating disks
12 ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="none"
15 boot.supportedFilesystems = [ "zfs" ];
17 # Ensure extra safeguards are active that zfs uses to protect zfs pools.
18 boot.zfs.forceImportAll = false;
19 boot.zfs.forceImportRoot = false;
21 boot.zfs.enableUnstable = true;
22 boot.zfs.requestEncryptionCredentials = true;
24 # Enables periodic scrubbing of ZFS pools.
25 services.zfs.autoScrub.enable = true;