From e6f3e0719abc9d73c8ac5ff46554d69601c95988 Mon Sep 17 00:00:00 2001 From: Antoine Viallon Date: Wed, 12 Apr 2023 00:40:43 +0200 Subject: [PATCH] [Boot] legacy BIOS -> Grub using assert --- boot.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/boot.nix b/boot.nix index 40a366e..a7d8bd5 100644 --- a/boot.nix +++ b/boot.nix @@ -150,6 +150,9 @@ in { { assertion = cfg.efi -> !cfg.legacy; message = "exactly one of aviallon.boot.efi and aviallon.boot.legacy must be set"; } + { assertion = cfg.legacy -> cfg.useGrub; + message = "Using GRUB is mandatory for legacy BIOS"; + } ]; boot.kernelParams = toCmdlineList cfg.cmdline; @@ -171,8 +174,6 @@ in { }; - aviallon.boot.useGrub = mkIf (!cfg.efi) (mkForce true); - boot = { initrd.kernelModules = [ ]; initrd.availableKernelModules = [ "ehci_pci" ];