mirror of
https://github.com/ItsDrike/nixdots
synced 2024-09-20 03:59:40 +00:00
24 lines
554 B
Nix
24 lines
554 B
Nix
|
{ 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";
|
||
|
};
|
||
|
};
|
||
|
}
|