mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Boot] Always add cmdline parameters even if boot config is disabled
Fix boot.loader.grub.device if cfg.efi is false
This commit is contained in:
parent
3a399de728
commit
09e949be39
1 changed files with 9 additions and 7 deletions
16
boot.nix
16
boot.nix
|
|
@ -89,8 +89,10 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
config = {
|
||||
boot.kernelParams = toCmdlineList cfg.cmdline;
|
||||
} // (mkIf cfg.enable {
|
||||
|
||||
hardware.enableAllFirmware = allowUnfree;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
|
|
@ -106,12 +108,12 @@ in
|
|||
|
||||
};
|
||||
|
||||
aviallon.boot.useGrub = mkIf (!cfg.efi) (mkForce true);
|
||||
|
||||
boot = {
|
||||
initrd.kernelModules = [ ];
|
||||
initrd.availableKernelModules = [ "ehci_pci" ];
|
||||
|
||||
kernelParams = toCmdlineList cfg.cmdline;
|
||||
|
||||
kernelPatches = concatLists [
|
||||
(optional cfg.x32abi.enable customKernelPatches.enableX32ABI)
|
||||
];
|
||||
|
|
@ -119,10 +121,10 @@ in
|
|||
(optional cfg.kvdo.enable pkgs.kvdo)
|
||||
];
|
||||
|
||||
loader.grub.enable = cfg.useGrub || (!cfg.efi);
|
||||
loader.grub.enable = cfg.useGrub;
|
||||
loader.grub = {
|
||||
version = 2;
|
||||
device = (if cfg.efi then "nodev" else null);
|
||||
device = mkIf cfg.efi "nodev";
|
||||
efiSupport = cfg.efi;
|
||||
configurationLimit = cfg.configurationLimit;
|
||||
};
|
||||
|
|
@ -141,5 +143,5 @@ in
|
|||
efi.canTouchEfiVariables = mkDefault true;
|
||||
};
|
||||
};
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue