Target(right): machine on which NixOS is installed
Executor(left): machine where you’ll run commands from
Lanzaboote replaces systemd-boot with signed Unified Kernel Images
(kernel, initrd and command line in one EFI binary). A host opts in by
listing lanzaboote.nix in its includedFeatures
in flake.nix; every other host boots plain
systemd-boot. Only the desktop opts in at the moment.
flowchart LR
A[add lanzaboote.nix] --> B[rebuild]
B --> C[first boot: keys generated]
C --> D[firmware: setup mode]
D --> E[next boot: systemd-boot enrolls keys]
E --> F[firmware: Secure Boot on]
The opt-in lives in version control because an evaluation that misses it installs an unsigned systemd-boot, and firmware enforcing Secure Boot refuses to start it: the machine stops at the firmware’s Secure Boot violation screen. For the same reason, turn Secure Boot off in firmware before removing the module from a host.
Enrollment happens in firmware Setup Mode: systemd-boot finds the files on the ESP and writes them to the firmware, together with the Microsoft keys. Those stay enrolled because GPU and NIC option ROMs are signed by Microsoft; without them the firmware refuses to run the GPU’s ROM and stops at boot.
The TPM releases the LUKS key only while the chosen PCRs (Platform Configuration Registers) hold the values they had at enrollment. The initrd SSH unlock stays available as a fallback whenever it refuses.
| PCR | Measures | Changes when |
|---|---|---|
| 0 | Firmware code | BIOS update |
| 7 | Secure Boot state and enrolled keys | Secure Boot toggled, keys changed |
| 11 | Unified kernel image | Every generation with a new kernel, initrd or command line |
Bind to PCRs 0 and 7. PCR 11 would refuse the key after almost every rebuild. Without Secure Boot enforced, PCR 7 is the same for any OS booted from USB, so the binding only protects the disk once it leaves the machine; with Secure Boot on, only signed images reach the point where the key is released.