WIP: Add Lanzaboote Secure Boot for cyprianspitz #150

Draft
fabianhauser wants to merge 2 commits from cyprianspitz-lanzaboote into main
Owner

Summary

  • Replace cyprianspitz's GRUB mirroredBoots dual-ESP setup with systemd-boot + Lanzaboote (UKI signing/UEFI Secure Boot), since Lanzaboote requires systemd-boot and can't coexist with GRUB.
  • Add a new qois.lanzaboote module (nixos-modules/lanzaboote) wrapping Lanzaboote: auto-generated/auto-enrolled Secure Boot keys (manual reboot required, no autoReboot), Measured Boot always on (pcrs = [ 0 1 2 3 4 7 ]), and TPM2 autoCryptenroll for LUKS volumes (multi-device, since Lanzaboote's built-in option only supports one).
  • Enable it on cyprianspitz, mirroring boot artifacts to both /boot-primary and /boot-secondary via extraEfiSysMountPoints, and auto-enrolling both crypted_system and crypted_data LUKS volumes.
  • Document the one-time manual Secure Boot Setup Mode / key enrollment step in nixos-configurations/setup.md.

Test plan

  • CI: nix flake check (builds, formatting, and the new nixos-modules VM test lanzaboote)
  • Manual, after merge + deploy, during a maintenance window with physical/IPMI access to cyprianspitz:
    • Clear the Platform Key to enter firmware Secure Boot Setup Mode, reboot once, confirm bootctl status reports Secure Boot: enabled (user)
    • Confirm auto-cryptenroll.service and auto-cryptenroll-data.service succeed and both LUKS volumes auto-unlock on a subsequent reboot without the qois.initrd-ssh-unlock passphrase step
## Summary - Replace cyprianspitz's GRUB `mirroredBoots` dual-ESP setup with `systemd-boot` + [Lanzaboote](https://github.com/nix-community/lanzaboote) (UKI signing/UEFI Secure Boot), since Lanzaboote requires systemd-boot and can't coexist with GRUB. - Add a new `qois.lanzaboote` module (`nixos-modules/lanzaboote`) wrapping Lanzaboote: auto-generated/auto-enrolled Secure Boot keys (manual reboot required, no `autoReboot`), Measured Boot always on (`pcrs = [ 0 1 2 3 4 7 ]`), and TPM2 `autoCryptenroll` for LUKS volumes (multi-device, since Lanzaboote's built-in option only supports one). - Enable it on cyprianspitz, mirroring boot artifacts to both `/boot-primary` and `/boot-secondary` via `extraEfiSysMountPoints`, and auto-enrolling both `crypted_system` and `crypted_data` LUKS volumes. - Document the one-time manual Secure Boot Setup Mode / key enrollment step in `nixos-configurations/setup.md`. ## Test plan - [ ] CI: `nix flake check` (builds, formatting, and the new `nixos-modules` VM test `lanzaboote`) - [ ] Manual, after merge + deploy, during a maintenance window with physical/IPMI access to cyprianspitz: - [ ] Clear the Platform Key to enter firmware Secure Boot Setup Mode, reboot once, confirm `bootctl status` reports `Secure Boot: enabled (user)` - [ ] Confirm `auto-cryptenroll.service` and `auto-cryptenroll-data.service` succeed and both LUKS volumes auto-unlock on a subsequent reboot without the `qois.initrd-ssh-unlock` passphrase step
Add Lanzaboote Secure Boot module and enable it on cyprianspitz
Some checks failed
CI / build (push) Failing after 2m31s
CI / deploy (docs-ops.qo.is) (push) Has been skipped
CI / deploy (system-physical) (push) Has been skipped
CI / deploy (system-vm) (push) Has been skipped
CI / deploy-ci (push) Has been skipped
2062366bfd
Replaces cyprianspitz's GRUB mirroredBoots dual-ESP setup with
systemd-boot + Lanzaboote (UKI signing, measured boot, and TPM2
autoCryptenroll for both LUKS volumes), since Lanzaboote requires
systemd-boot and can't coexist with GRUB.
Fix lanzaboote module VM test
Some checks failed
CI / build (push) Failing after 1h0m40s
CI / deploy (docs-ops.qo.is) (push) Has been skipped
CI / deploy (system-physical) (push) Has been skipped
CI / deploy (system-vm) (push) Has been skipped
CI / deploy-ci (push) Has been skipped
f875f03adc
Sets up a nix profile symlink before switch-to-configuration (lzbt
needs it to parse the generation number for the UKI filename) and
stops waiting on systemd-pcrlock units whose live state doesn't
reflect success in this test environment (a plain oneshot that
already finished, and a firmware-measurement unit with no event log
available under this VM's OVMF).
fabianhauser changed title from Add Lanzaboote Secure Boot for cyprianspitz to WIP: Add Lanzaboote Secure Boot for cyprianspitz 2026-08-20 15:46:13 +00:00
fabianhauser force-pushed cyprianspitz-lanzaboote from f875f03adc
Some checks failed
CI / build (push) Failing after 1h0m40s
CI / deploy (docs-ops.qo.is) (push) Has been skipped
CI / deploy (system-physical) (push) Has been skipped
CI / deploy (system-vm) (push) Has been skipped
CI / deploy-ci (push) Has been skipped
to b3f45a2fc1
All checks were successful
CI / build (push) Successful in 3m57s
CI / deploy (docs-ops.qo.is) (push) Has been skipped
CI / deploy (system-physical) (push) Has been skipped
CI / deploy (system-vm) (push) Has been skipped
CI / deploy-ci (push) Has been skipped
2026-08-28 11:11:09 +00:00
Compare
All checks were successful
CI / build (push) Successful in 3m57s
CI / deploy (docs-ops.qo.is) (push) Has been skipped
CI / deploy (system-physical) (push) Has been skipped
CI / deploy (system-vm) (push) Has been skipped
CI / deploy-ci (push) Has been skipped
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin cyprianspitz-lanzaboote:cyprianspitz-lanzaboote
git switch cyprianspitz-lanzaboote
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
qo.is/infrastructure!150
No description provided.