mirror of
https://github.com/ItsDrike/nixdots
synced 2025-06-29 18:10:41 +00:00
Add secure-boot
This commit is contained in:
parent
fa6f2b49db
commit
cb968bdc07
12 changed files with 459 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
_: {
|
||||
imports = [
|
||||
./systemd-boot.nix
|
||||
./secure-boot.nix
|
||||
];
|
||||
}
|
||||
|
|
23
system/boot/secure-boot.nix
Normal file
23
system/boot/secure-boot.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, pkgs, lib, ... }: let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfg = config.myOptions.system.secure-boot;
|
||||
in {
|
||||
config = mkIf cfg.enabled {
|
||||
# Secure Boot Key Manager
|
||||
environment.systemPackages = [ pkgs.sbctl ];
|
||||
|
||||
# Persist the secure boot keys (for impermanence)
|
||||
myOptions.system.impermanence.root.extraDirectories = [
|
||||
"/etc/secureboot"
|
||||
];
|
||||
|
||||
# Lanzaboote replaces systemd-boot
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue