Repository navigation
Secure Boot
modules/secureboot.nix adds lanzaboote
(pinned to a release tag in flake.nix): systemd-boot's signed stub and signed
unified kernel images, with your own keys in /var/lib/sbctl. It is off until
dots.secureBoot.enable = true; in hosts/nixos/configuration.nix, and sbctl
is installed either way.
The disks are already LUKS-encrypted; Secure Boot adds that only boot files you
signed will run, so nobody can swap the kernel or initrd on the unencrypted
/boot to capture the passphrase.
The cachyos kernel doesn't force lockdown under Secure Boot
(LOCK_DOWN_KERNEL_FORCE_NONE, no MODULE_SIG_FORCE), so the unsigned NVIDIA
modules keep loading.
-
Keys.
sudo sbctl create-keys(into/var/lib/sbctl, root-only). Do this first: switching with the option on but no keys fails at the bootloader step (the running generation keeps booting). -
Sign. Set
dots.secureBoot.enable = true;, thennh os switch. -
Check.
sudo sbctl verify: the lanzaboote images under/boot/EFImust show as signed. Leftover unsigned files from the old systemd-boot entries (*bzImage.efi) are expected and go away as generations rotate. -
Setup Mode.
systemctl reboot --firmware-setup, then in the firmware's Secure Boot menu reset or delete the keys so it enters Setup Mode (on ASUS boards: Key Management → Clear Secure Boot keys). Keep Secure Boot off for now. -
Enroll. Back in NixOS:
sudo sbctl enroll-keys --microsoft. Keep--microsoft: the RTX 3060's option ROM is Microsoft-signed, and without those keys the card can show nothing before Linux starts. -
Enable.
systemctl reboot --firmware-setup, turn Secure Boot on, boot.bootctl statusshould saySecure Boot: enabled (user).
Turn Secure Boot off in the firmware: everything still boots. To drop
lanzaboote too, set the option back to false and switch.
Source: docs/secure-boot.md
Generated from docs/. Edits made here are overwritten on the next push — change the repo instead.
Start
Reference
Help
More