mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-11-13 12:13:36 +01:00
34 lines
862 B
Nix
34 lines
862 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
lanzaboote,
|
|
...
|
|
}:
|
|
{
|
|
# How to enter setup mode - msi motherboard
|
|
## 1. enter BIOS via [Del] Key
|
|
## 2. <Advance mode> => <Settings> => <Security> => <Secure Boot>
|
|
## 3. enable <Secure Boot>
|
|
## 4. set <Secure Boot Mode> to <Custom>
|
|
## 5. enter <Key Management>
|
|
## 6. select <Delete All Secure Boot Variables>, and then select <No> for <Reboot Without Saving>
|
|
## 7. Press F10 to saving and reboot.
|
|
imports = [
|
|
lanzaboote.nixosModules.lanzaboote
|
|
];
|
|
|
|
environment.systemPackages = [
|
|
# For debugging and troubleshooting Secure Boot.
|
|
pkgs.sbctl
|
|
];
|
|
|
|
# Lanzaboote replaces the systemd-boot module. NixOS's generated
|
|
# configuration.nix sets this to true, so force it off.
|
|
boot.loader.systemd-boot.enable = lib.mkForce false;
|
|
|
|
boot.lanzaboote = {
|
|
enable = true;
|
|
pkiBundle = "/etc/secureboot";
|
|
};
|
|
}
|