Signed-off-by: Bloxx12 <charlie@charlieroot.dev> Change-Id: I6a6a69641c36f9763e104087a559c148d0449f00
36 lines
791 B
Nix
36 lines
791 B
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
sources,
|
|
...
|
|
}:
|
|
let
|
|
inherit (lib.modules) mkIf;
|
|
inherit (lib.options) mkEnableOption;
|
|
|
|
cfg = config.modules.system.boot.lanzaboote;
|
|
in
|
|
{
|
|
options.modules.system.boot.lanzaboote.enable = mkEnableOption "Lanzaboote";
|
|
imports = [
|
|
(sources.lanzaboote + "/nix/modules/lanzaboote.nix")
|
|
];
|
|
|
|
config = mkIf cfg.enable {
|
|
boot = {
|
|
lanzaboote = {
|
|
enable = true;
|
|
pkiBundle = "/var/lib/sbctl";
|
|
};
|
|
|
|
# Lanzaboote currently replaces the systemd-boot module.
|
|
# This setting is usually set to true in configuration.nix
|
|
# generated at installation time. So we force it to false
|
|
# for now.
|
|
loader.systemd-boot.enable = lib.mkForce false;
|
|
};
|
|
|
|
environment.systemPackages = [ pkgs.sbctl ];
|
|
};
|
|
}
|