1 { pkgs, lib, config, ... }:
5 boot.supportedFilesystems = [ "zfs" ];
7 # The 32-bit host id of the machine, formatted as 8 hexadecimal characters.
8 # You should try to make this id unique among your machines.
9 # Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
10 networking.hostId = "69c40b03";
12 # noop, the recommended elevator with zfs.
17 # FIXME: Uncomment [on a working system] to 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;
28 # Enable the (OpenSolaris-compatible) ZFS auto-snapshotting service.
29 services.zfs.autoSnapshot = {
40 { device = "bpool/boot";
45 { device = "rpool/root";
50 { device = "rpool/home";
55 { device = "rpool/nix";
59 fileSystems."/nix/var" =
60 { device = "rpool/nix/var";
65 { device = "rpool/var";
69 fileSystems."/var/cache" =
70 { device = "rpool/var/cache";
74 fileSystems."/var/log" =
75 { device = "rpool/var/log";
79 fileSystems."/var/mail" =
80 { device = "rpool/var/mail";
84 fileSystems."/var/tmp" =
85 { device = "rpool/var/tmp";
89 fileSystems."/var/www" =
90 { device = "rpool/var/www";