summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2015-02-13 14:40:41 -0800
committerWilliam A. Kennington III <william@wkennington.com>2015-02-13 14:40:41 -0800
commit1fddcd1e83f7d2266eb8e2e0446adce4e2d3e606 (patch)
tree292496fe6665c150e01df3fae079fd5737d4f2ff
parent69a277e2cc9286d966489823b0940d8d4a6bc637 (diff)
downloadnixlib-1fddcd1e83f7d2266eb8e2e0446adce4e2d3e606.tar
nixlib-1fddcd1e83f7d2266eb8e2e0446adce4e2d3e606.tar.gz
nixlib-1fddcd1e83f7d2266eb8e2e0446adce4e2d3e606.tar.bz2
nixlib-1fddcd1e83f7d2266eb8e2e0446adce4e2d3e606.tar.lz
nixlib-1fddcd1e83f7d2266eb8e2e0446adce4e2d3e606.tar.xz
nixlib-1fddcd1e83f7d2266eb8e2e0446adce4e2d3e606.tar.zst
nixlib-1fddcd1e83f7d2266eb8e2e0446adce4e2d3e606.zip
grub: Don't remove zfs support if contained in the default binary
-rw-r--r--nixos/modules/system/boot/loader/grub/grub.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index 0cfef7df1972..fd6523c0ece4 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -9,7 +9,8 @@ let
   efi = config.boot.loader.efi;
 
   realGrub = if cfg.version == 1 then pkgs.grub
-    else pkgs.grub2.override { zfsSupport = cfg.zfsSupport; };
+    else if cfg.zfsSupport then pkgs.grub2.override { zfsSupport = true; }
+    else pkgs.grub2;
 
   grub =
     # Don't include GRUB if we're only generating a GRUB menu (e.g.,
@@ -21,7 +22,7 @@ let
   grubEfi =
     # EFI version of Grub v2
     if (cfg.devices != ["nodev"]) && cfg.efiSupport && (cfg.version == 2)
-    then pkgs.grub2.override { zfsSupport = cfg.zfsSupport; efiSupport = cfg.efiSupport; }
+    then realGrub.override { efiSupport = cfg.efiSupport; }
     else null;
 
   f = x: if x == null then "" else "" + x;