Author: mkwik
Date: Thu May 17 10:17:32 2012
New Revision: 34153
URL: https://nixos.org/websvn/nix/?rev=34153&sc=1

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

Modified:
   nixos/trunk/modules/installer/grub/grub.nix
   nixos/trunk/modules/system/activation/no-clone.nix

Modified: nixos/trunk/modules/installer/grub/grub.nix
==============================================================================
--- nixos/trunk/modules/installer/grub/grub.nix Thu May 17 10:16:14 2012        
(r34152)
+++ nixos/trunk/modules/installer/grub/grub.nix Thu May 17 10:17:32 2012        
(r34153)
@@ -136,6 +136,14 @@
         '';
       };
 
+      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 @@
 
     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;

Modified: nixos/trunk/modules/system/activation/no-clone.nix
==============================================================================
--- nixos/trunk/modules/system/activation/no-clone.nix  Thu May 17 10:16:14 
2012        (r34152)
+++ nixos/trunk/modules/system/activation/no-clone.nix  Thu May 17 10:17:32 
2012        (r34153)
@@ -6,8 +6,9 @@
 
 {
   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 {} [];
 }
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits

Reply via email to