mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
bootspec: honor boot.kernel.enable
WSL and other container-brained-but-not-really systems may not want a kernel, and now that bootspec is no longer optional, this pulls one in anyway.
This commit is contained in:
parent
52cda05670
commit
1fdf8fd586
1 changed files with 3 additions and 1 deletions
|
|
@ -26,9 +26,11 @@ let
|
|||
// {
|
||||
"org.nixos.bootspec.v1" = {
|
||||
system = config.boot.kernelPackages.stdenv.hostPlatform.system;
|
||||
label = "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})";
|
||||
}
|
||||
// lib.optionalAttrs config.boot.kernel.enable {
|
||||
kernel = "${config.boot.kernelPackages.kernel}/${config.system.boot.loader.kernelFile}";
|
||||
kernelParams = config.boot.kernelParams;
|
||||
label = "${config.system.nixos.distroName} ${config.system.nixos.codeName} ${config.system.nixos.label} (Linux ${config.boot.kernelPackages.kernel.modDirVersion})";
|
||||
}
|
||||
// lib.optionalAttrs config.boot.initrd.enable {
|
||||
initrd = "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue