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.
| Feature | Detail |
|---|---|
| Partition table | GPT with a 512 MB EFI system partition at /boot |
| Encryption | LUKS2 on the rest, unlocked by a passphrase or FIDO2 key |
| SSD tuning | Discard support, no read or write work queues |
| Filesystem | Btrfs with zstd compression and noatime |
| Subvolumes | /, /home, /nix, /persist, /var/log, /swap |
| Swap | A 16 GB swap file |
| Boot mounts | /persist and /var/log available at boot |
Example
Section titled “Example”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.