Making the bootloaders respect the platform.kernelTarget set in nixpkgs.

svn path=/nixos/trunk/; revision=20283
This commit is contained in:
Lluís Batlle i Rossell 2010-02-27 22:17:10 +00:00
parent 9002335101
commit b6090bff9d
2 changed files with 3 additions and 7 deletions

View File

@ -42,8 +42,7 @@ let
};
# Temporary check, for nixos to cope both with nixpkgs stdenv-updates and trunk
platform = (if pkgs ? platform then pkgs.platform else
{ name = "pc"; uboot = null; });
platform = pkgs.stdenv.platform;
in
{
require = [
@ -58,9 +57,6 @@ in
menuBuilder = generationsDirBuilder;
};
boot.loader.id = "generationsDir";
boot.loader.kernelFile = (
if (platform.name == "sheevaplug") then "uImage"
else if (platform.name == "versatileARM") then "zImage"
else "bzImage");
boot.loader.kernelFile = platform.kernelTarget;
};
}

View File

@ -149,7 +149,7 @@ in
# Common attribute for boot loaders so only one of them can be
# set at once.
system.boot.loader.id = "grub";
system.boot.loader.kernelFile = "bzImage";
system.boot.loader.kernelFile = pkgs.stdenv.platform.kernelTarget;
environment.systemPackages = mkIf config.boot.loader.grub.enable [ grub ];