diff --git a/modules/installer/efi-boot-stub/efi-boot-stub.nix b/modules/installer/efi-boot-stub/efi-boot-stub.nix index c83ba8937b6..55c4055ca1e 100644 --- a/modules/installer/efi-boot-stub/efi-boot-stub.nix +++ b/modules/installer/efi-boot-stub/efi-boot-stub.nix @@ -108,7 +108,9 @@ in # ../system/system-options.nix ]; - system = mkIf config.boot.loader.efiBootStub.enable { + system = mkIf (config.boot.loader.efiBootStub.enable && (assert + (config.boot.kernelPackages.kernel.features ? efiBootStub && + config.boot.kernelPackages.kernel.features.efiBootStub); true)) { build = { menuBuilder = efiBootStubBuilder; };