add secure boot support
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
./syncthing
|
||||
./graphics
|
||||
./flatpak
|
||||
./secure_boot
|
||||
];
|
||||
|
||||
system.ssh.enable = lib.mkDefault true;
|
||||
|
||||
31
modules/system/secure_boot/default.nix
Normal file
31
modules/system/secure_boot/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.system.secure_boot;
|
||||
in {
|
||||
options.system.secure_boot = {
|
||||
enable = lib.mkEnableOption "enables secureboot with lanzaboote";
|
||||
};
|
||||
|
||||
imports = [inputs.lanzaboote.nixosModules.lanzaboote];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
# install userspace secureboot tools
|
||||
environment.systemPackages = with pkgs; [
|
||||
sbctl
|
||||
];
|
||||
|
||||
# force disable systemd-boot so lanzaboote can be used
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/var/lib/sbctl";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user