Provided a workaround for grub's missing-devices check, so nested child configurations can still build.

svn path=/nixos/trunk/; revision=34153
This commit is contained in:
Mathijs Kwik 2012-05-17 10:17:32 +00:00
parent 3ce8859551
commit 88b3c4b82e
2 changed files with 11 additions and 2 deletions

View File

@ -136,6 +136,14 @@ in
'';
};
ignoreDevicesCheck = mkOption {
default = false;
description = ''
(internal use) Don't throw an error when devices aren't given
useful for building nested child configurations
'';
};
splashImage = mkOption {
default =
if config.boot.loader.grub.version == 1
@ -197,7 +205,7 @@ in
boot.loader.grub.devices = optional (cfg.device != "") cfg.device;
system.build = mkAssert (cfg.devices != [])
system.build = mkAssert (cfg.devices != [] || cfg.ignoreDevicesCheck)
"You must set the boot.loader.grub.device option to make the system bootable."
{ menuBuilder = grubMenuBuilder;
inherit grub;

View File

@ -6,8 +6,9 @@ with pkgs.lib;
{
boot.loader.grub.device = mkOverrideTemplate 0 {} "";
# undefined the obsolete name of the previous option.
# undefine the obsolete name of the previous option.
boot.grubDevice = mkOverrideTemplate 0 {} pkgs.lib.mkNotdef;
boot.loader.grub.ignoreDevicesCheck = mkOverrideTemplate 0 {} true;
nesting.children = mkOverrideTemplate 0 {} [];
nesting.clone = mkOverrideTemplate 0 {} [];
}