[Boot] legacy BIOS -> Grub using assert

This commit is contained in:
Antoine Viallon 2023-04-12 00:40:43 +02:00
parent 803eea5e76
commit e6f3e0719a
Signed by: aviallon
GPG key ID: 186FC35EDEB25716

View file

@ -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" ];