Created
September 7, 2024 15:52
-
-
Save jamesog/c68f6aa2df2c0fbc14cea6c5c2157c00 to your computer and use it in GitHub Desktop.
NixOS on ZFS root (UTM / virtio)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
networking.hostId = "..."; # Use head -c8 /etc/machine-id to get this | |
services.zfs.autoScrub.enable = true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
boot.initrd.kernelModules = [ "zfs" ]; | |
boot.zfs.devNodes = "/dev"; # IMPORTANT: On UTM / virtio the disk doesn't show in /dev/disk/by-id and the system won't boot | |
# fileSystems as added by nixos-generate-config | |
swapDevices = [ { device = "/dev/zvol/rpool/swap"; } ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment