1 { pkgs, lib, config, ... }:
6 boot.supportedFilesystems = [ "zfs" ];
8 # The 32-bit host id of the machine, formatted as 8 hexadecimal characters.
9 # You should try to make this id unique among your machines.
10 # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
11 networking.hostId = "69c40b03";
13 # noop, the recommended elevator with zfs.
18 # FIXME: Uncomment [on a working system] to ensure extra safeguards are active that zfs uses to protect zfs pools:
19 #boot.zfs.forceImportAll = false;
20 #boot.zfs.forceImportRoot = false;
22 boot.zfs.enableUnstable = true;
23 boot.zfs.requestEncryptionCredentials = true;
25 # Enables periodic scrubbing of ZFS pools.
26 services.zfs.autoScrub.enable = true;
29 # Enable the (OpenSolaris-compatible) ZFS auto-snapshotting service.
30 services.zfs.autoSnapshot = {
41 { device = "bpool/boot";
46 { device = "rpool/root";
51 { device = "rpool/home";
56 { device = "rpool/nix";
60 fileSystems."/nix/var" =
61 { device = "rpool/nix/var";
66 { device = "rpool/var";
70 fileSystems."/var/cache" =
71 { device = "rpool/var/cache";
75 fileSystems."/var/log" =
76 { device = "rpool/var/log";
80 fileSystems."/var/mail" =
81 { device = "rpool/var/mail";
85 fileSystems."/var/tmp" =
86 { device = "rpool/var/tmp";
90 fileSystems."/var/www" =
91 { device = "rpool/var/www";