3
0
Fork 0
forked from mirrors/nixpkgs

Enable grub zfsSupport if zfs is built into the initrd

This commit is contained in:
William A. Kennington III 2014-04-09 13:27:45 -05:00
parent 3c6e2fbba9
commit 02ab48d0ee
2 changed files with 6 additions and 2 deletions

View file

@ -7,7 +7,7 @@ let
cfg = config.boot.loader.grub;
realGrub = if cfg.version == 1 then pkgs.grub
else pkgs.grub2.override { zfsSupport = cfg.zfsSupport };
else pkgs.grub2.override { zfsSupport = cfg.zfsSupport; };
grub =
# Don't include GRUB if we're only generating a GRUB menu (e.g.,

View file

@ -133,7 +133,7 @@ in
};
boot.initrd = mkIf inInitrd {
kernelModules = [ "spl" "zfs" ] ;
kernelModules = [ "spl" "zfs" ];
extraUtilsCommands =
''
cp -v ${zfsPkg}/sbin/zfs $out/bin
@ -148,6 +148,10 @@ in
'';
};
boot.loader.grub = mkIf inInitrd {
zfsSupport = true;
};
systemd.services."zpool-import" = {
description = "Import zpools";
after = [ "systemd-udev-settle.service" ];