0004 Disko with GPT partlabels
Context
Host disk layouts were hand-partitioned and inconsistent; reinstalls were artisanal. Declarative partitioning needed a stable way for the bootloader and fstab to find partitions across device-name changes (
/dev/sdavs/dev/nvme0n1).
Decision
Use disko for declarative partitioning on the x86 hosts, with mounts keyed on GPT partlabels (
disk-main-*). Each host declares only its target device (homelab.disko.deviceinflake.nix).
Consequences
Installs and reinstalls are reproducible from the flake; device naming no longer matters.
Hosts labeled before the disko change fail to boot on a new generation unless relabeled to
disk-main-*; relabel scripts live innix/scripts/.Rollback on an unmigrated host is the bootloader's previous-generation menu.
Links
Linked references 2
ADR/0004 Disko with GPT partlabels — declarative partitioning keyed on disk-main-* labels
Partitioning is declarative via disko with GPT partlabels (disk-main-*). Hosts installed before the migration need their partitions relabeled or they fail to boot — see ADR/0004 Disko with GPT partlabels and the scripts in nix/scripts/.