# Secure Boot through lanzaboote. Keys live in /var/lib/sbctl (create them with # `sbctl create-keys` before the first boot). A host that does not want Secure # Boot imports the `systemd-boot` aspect instead; import only one of the two. { inputs, ... }: { flake.modules.nixos.secure-boot = { lib, pkgs, ... }: { imports = [ inputs.lanzaboote.nixosModules.lanzaboote ]; boot = { lanzaboote = { enable = true; pkiBundle = "/var/lib/sbctl"; configurationLimit = 10; }; # lanzaboote installs the boot entries itself. loader.systemd-boot.enable = lib.mkForce false; }; environment.systemPackages = [ pkgs.sbctl ]; }; }