Add optional secure boot module and docs
This commit is contained in:
parent
f55cb439a3
commit
332b5133ce
4 changed files with 165 additions and 0 deletions
23
modules/system/secure-boot.nix
Normal file
23
modules/system/secure-boot.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
# Requires: import `inputs.lanzaboote.nixosModules.lanzaboote` alongside this module.
|
||||
# Purpose: post-install Secure Boot enablement with self-managed keys.
|
||||
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
boot.loader.efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot";
|
||||
};
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/var/lib/secureboot"; # persistent location (not in the Nix store)
|
||||
autoGenerateKeys.enable = true;
|
||||
autoEnrollKeys = {
|
||||
enable = true;
|
||||
includeMicrosoftKeys = true; # keeps Windows/option-ROM compatibility
|
||||
autoReboot = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue