diff options
author | William A. Kennington III <william@wkennington.com> | 2014-04-09 13:27:45 -0500 |
---|---|---|
committer | William A. Kennington III <william@wkennington.com> | 2014-08-28 13:35:34 -0700 |
commit | 02ab48d0eea6e37d3432f6b8ce4c31b85e8d3ffe (patch) | |
tree | e5b6a40f8914718b11273dd2c713084ee970e4fa /nixos | |
parent | 3c6e2fbba910cd3f110a0388c0a374d1573082ef (diff) | |
download | nixlib-02ab48d0eea6e37d3432f6b8ce4c31b85e8d3ffe.tar nixlib-02ab48d0eea6e37d3432f6b8ce4c31b85e8d3ffe.tar.gz nixlib-02ab48d0eea6e37d3432f6b8ce4c31b85e8d3ffe.tar.bz2 nixlib-02ab48d0eea6e37d3432f6b8ce4c31b85e8d3ffe.tar.lz nixlib-02ab48d0eea6e37d3432f6b8ce4c31b85e8d3ffe.tar.xz nixlib-02ab48d0eea6e37d3432f6b8ce4c31b85e8d3ffe.tar.zst nixlib-02ab48d0eea6e37d3432f6b8ce4c31b85e8d3ffe.zip |
Enable grub zfsSupport if zfs is built into the initrd
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/system/boot/loader/grub/grub.nix | 2 | ||||
-rw-r--r-- | nixos/modules/tasks/filesystems/zfs.nix | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix index 25cec57431e1..67fcd10ceb8c 100644 --- a/nixos/modules/system/boot/loader/grub/grub.nix +++ b/nixos/modules/system/boot/loader/grub/grub.nix @@ -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., diff --git a/nixos/modules/tasks/filesystems/zfs.nix b/nixos/modules/tasks/filesystems/zfs.nix index d7deb44c407c..1c4bbc16b499 100644 --- a/nixos/modules/tasks/filesystems/zfs.nix +++ b/nixos/modules/tasks/filesystems/zfs.nix @@ -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" ]; |