about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJacek Galowicz <jacek@galowicz.de>2021-02-18 11:58:57 +0100
committerGitHub <noreply@github.com>2021-02-18 11:58:57 +0100
commitbc7a369c686c563e64dc7f56a996f48d08c1b8b5 (patch)
tree0d47b97c23c68f406c0ed2b1c5a45ee778ee5b3d /nixos
parenteecade6b3e406527a26e6ed11d48461b668673f3 (diff)
parent5406db08bf0939deebd1ed8d85511d4a93f2fe05 (diff)
Merge pull request #112961 from r-burns/nixos-test-grub
nixosTests.installer: fix non-zfs grub tests
Diffstat (limited to 'nixos')
-rw-r--r--nixos/tests/installer.nix15
1 files changed, 9 insertions, 6 deletions
diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix
index 789add331b793..904ec17229e1c 100644
--- a/nixos/tests/installer.nix
+++ b/nixos/tests/installer.nix
@@ -325,10 +325,13 @@ let
             curl
           ]
           ++ optional (bootLoader == "grub" && grubVersion == 1) pkgs.grub
-          ++ optionals (bootLoader == "grub" && grubVersion == 2) [
-            (pkgs.grub2.override { zfsSupport = true; })
-            (pkgs.grub2_efi.override { zfsSupport = true; })
-          ];
+          ++ optionals (bootLoader == "grub" && grubVersion == 2) (let
+            zfsSupport = lib.any (x: x == "zfs")
+              (extraInstallerConfig.boot.supportedFilesystems or []);
+          in [
+            (pkgs.grub2.override { inherit zfsSupport; })
+            (pkgs.grub2_efi.override { inherit zfsSupport; })
+          ]);
 
           nix.binaryCaches = mkForce [ ];
           nix.extraOptions = ''
@@ -398,9 +401,9 @@ let
     createPartitions = ''
       machine.succeed(
           "flock /dev/vda parted --script /dev/vda -- mklabel gpt"
-          + " mkpart ESP fat32 1M 50MiB"  # /boot
+          + " mkpart ESP fat32 1M 100MiB"  # /boot
           + " set 1 boot on"
-          + " mkpart primary linux-swap 50MiB 1024MiB"
+          + " mkpart primary linux-swap 100MiB 1024MiB"
           + " mkpart primary ext2 1024MiB -1MiB",  # /
           "udevadm settle",
           "mkswap /dev/vda2 -L swap",