From 9e980235bd4e62bb028297105691a783450ceaff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Mon, 12 Mar 2012 09:42:24 +0000 Subject: [PATCH] Properly filter a possible lack of "grub.device", in case of using only "grub.devices". svn path=/nixos/trunk/; revision=33009 --- modules/system/activation/top-level.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/system/activation/top-level.nix b/modules/system/activation/top-level.nix index a0a3b2c9b2f..265f06a5a9d 100644 --- a/modules/system/activation/top-level.nix +++ b/modules/system/activation/top-level.nix @@ -171,10 +171,12 @@ let if config.boot.loader.grub.enable then (builtins.parseDrvName config.system.build.grub.name).version else ""; - grubDevices = let + grubDevices = with pkgs.lib; let wrapQuotes = s: "\"" + s + "\""; - in map wrapQuotes ([ config.boot.loader.grub.device ] ++ - config.boot.loader.grub.devices); + allDevices = [ config.boot.loader.grub.device ] ++ + config.boot.loader.grub.devices; + definedDevices = filter (s: s != "") allDevices; + in map wrapQuotes definedDevices; configurationName = config.boot.loader.grub.configurationName; };