1 KiB
1 KiB
Secure Boot after installing
The installer ISO still requires Secure Boot off to boot. After installation you can enable Secure Boot on the installed system using Lanzaboote.
Steps (per host):
- In
flake.nixinputs, keeplanzaboote.url = "github:nix-community/lanzaboote";(already present). - In your host module (e.g.
hosts/<hostname>.nix), add imports:inputs.lanzaboote.nixosModules.lanzaboote../modules/system/secure-boot.nix
- Rebuild on the target system (with Secure Boot still disabled):
sudo nixos-rebuild switch --flake .#<hostname> - Reboot once more to let Lanzaboote enroll keys; you’ll see a brief enrollment phase via systemd-boot.
- Enter firmware setup and re-enable Secure Boot. Boot should now succeed with the signed UKI.
Notes
- Keys are stored at
/var/lib/secureboot(persist this if you use impermanence). - Microsoft keys are included for compatibility; adjust in
secure-boot.nixif you want fully custom trust. - If you regenerate keys, re-run the rebuild and reboot before toggling firmware settings.