Skip to content

Disks

The system/disks/automatic partitioning is an opinionated default that overrides easily. A host can point it at another disk via disko.devices.disk.main.device, add further drives as extra disko.devices.disk.<name> entries, or — for machines with special requirements — leave it out entirely and declare its own fileSystems (or a custom disko layout) instead.

FeatureDetail
Partition tableGPT with a 512 MB EFI system partition at /boot
EncryptionLUKS2 on the rest, unlocked by a passphrase or FIDO2 key
SSD tuningDiscard support, no read or write work queues
FilesystemBtrfs with zstd compression and noatime
Subvolumes/, /home, /nix, /persist, /var/log, /swap
SwapA 16 GB swap file
Boot mounts/persist and /var/log available at boot
hosts/example/default.nix
disko.devices.disk.main.device = "/dev/nvme0n1";

The device is the one part set as a default (the rest of the layout is fixed), so it is the part a host overrides. It points at /dev/sda; here a machine that boots from an NVMe drive points it there instead, and keeps everything else.