From 8c5b2001649317ba2dd626200a072c80db22e56c Mon Sep 17 00:00:00 2001 From: Nicolas Pierron Date: Fri, 30 Oct 2009 11:57:23 +0000 Subject: [PATCH] * boor.loader.grub.device can only be defined once. * Replace an obscure piece of code by its equivalent based on the recursiveUpdate function. Undefined the obsolete name of boot.grubDevice to avoid conflicts. svn path=/nixos/trunk/; revision=18049 --- modules/installer/grub/grub.nix | 1 + modules/system/activation/top-level.nix | 14 +++++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/modules/installer/grub/grub.nix b/modules/installer/grub/grub.nix index 37b7a7f4a707..cb716a2a84e7 100644 --- a/modules/installer/grub/grub.nix +++ b/modules/installer/grub/grub.nix @@ -45,6 +45,7 @@ in device = mkOption { default = ""; example = "/dev/hda"; + type = with pkgs.lib.types; uniq string; description = '' The device on which the boot loader, GRUB, will be installed. If empty, GRUB won't be installed and it's your responsibility diff --git a/modules/system/activation/top-level.nix b/modules/system/activation/top-level.nix index 609b11dd3d6d..1e3f22c37adf 100644 --- a/modules/system/activation/top-level.nix +++ b/modules/system/activation/top-level.nix @@ -41,9 +41,17 @@ let # you can provide an easy way to boot the same configuration # as you use, but with another kernel # !!! fix this - children = map (x: ((import ../../../default.nix) - { configuration = x//{boot=((x.boot)//{grubDevice = "";});};}).system) - config.nesting.children; + children = + map (childConfig: + (import ../../../default.nix { + configuration = + pkgs.lib.recursiveUpdate childConfig { + boot.loader.grub.device = ""; + # undefined the obsolete name of the previous option. + boot.grubDevice = pkgs.lib.mkNotdef; + }; + }).system + ) config.nesting.children; systemBuilder =