feat(boot): configure systemd-boot and GRUB based on options

This commit is contained in:
tux
2026-05-10 04:54:52 +05:30
parent bd6055cae5
commit cb3389bce6
2 changed files with 34 additions and 8 deletions

View File

@@ -18,11 +18,16 @@
};
config = lib.mkIf cfg.secure-boot.enable {
environment.systemPackages = [
pkgs.sbctl
assertions = [
{
assertion = !cfg.legacy.enable;
message = "secure-boot and legacy boot (GRUB) cannot be enabled at the same time";
}
];
# Lanzaboote currently replaces the systemd-boot module.
environment.systemPackages = [ pkgs.sbctl ];
# Lanzaboote replaces systemd-boot, so force it off
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {