From ecfb74e5cf0e1ba2f0fc0f462fbe946d8abe401a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 2 Sep 2023 19:42:05 +0200 Subject: [PATCH] remove another instance of hostId --- lib/tests.nix | 3 +-- tests/cli.nix | 1 + tests/complex.nix | 1 + tests/module.nix | 1 + tests/zfs-over-legacy.nix | 5 ++--- tests/zfs.nix | 1 + 6 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/tests.nix b/lib/tests.nix index 3012ec3..a55e67a 100644 --- a/lib/tests.nix +++ b/lib/tests.nix @@ -167,8 +167,7 @@ let ({ config, ... }: { boot.supportedFilesystems = [ "btrfs" "cifs" "f2fs" "jfs" "ntfs" "reiserfs" "vfat" "xfs" ] ++ - lib.optional (lib.meta.availableOn pkgs.stdenv.hostPlatform config.boot.zfs.package) "zfs"; - networking.hostId = "8425e349"; + lib.optional (config.networking.hostId != null && lib.meta.availableOn pkgs.stdenv.hostPlatform config.boot.zfs.package) "zfs"; }) (if lib.versionAtLeast (lib.versions.majorMinor lib.version) "23.11" then { diff --git a/tests/cli.nix b/tests/cli.nix index 2f44308..c1218bc 100644 --- a/tests/cli.nix +++ b/tests/cli.nix @@ -5,6 +5,7 @@ diskoLib.testLib.makeDiskoTest { inherit pkgs; name = "cli"; disko-config = ../example/complex.nix; + extraInstallerConfig.networking.hostId = "8425e349"; extraSystemConfig = { networking.hostId = "8425e349"; fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this! diff --git a/tests/complex.nix b/tests/complex.nix index c115d01..c5aff2d 100644 --- a/tests/complex.nix +++ b/tests/complex.nix @@ -5,6 +5,7 @@ diskoLib.testLib.makeDiskoTest { inherit pkgs; name = "complex"; disko-config = ../example/complex.nix; + extraInstallerConfig.networking.hostId = "8425e349"; extraSystemConfig = { networking.hostId = "8425e349"; fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this! diff --git a/tests/module.nix b/tests/module.nix index 3ccba50..16e9a80 100644 --- a/tests/module.nix +++ b/tests/module.nix @@ -5,6 +5,7 @@ diskoLib.testLib.makeDiskoTest { inherit pkgs; name = "module"; disko-config = ../example/complex.nix; + extraInstallerConfig.networking.hostId = "8425e349"; extraSystemConfig = { networking.hostId = "8425e349"; fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this! diff --git a/tests/zfs-over-legacy.nix b/tests/zfs-over-legacy.nix index 1e4162f..af78060 100644 --- a/tests/zfs-over-legacy.nix +++ b/tests/zfs-over-legacy.nix @@ -4,9 +4,8 @@ diskoLib.testLib.makeDiskoTest { inherit pkgs; name = "zfs-over-legacy"; - extraSystemConfig = { - networking.hostId = "8425e349"; - }; + extraInstallerConfig.networking.hostId = "8425e349"; + extraSystemConfig.networking.hostId = "8425e349"; disko-config = ../example/zfs-over-legacy.nix; extraTestScript = '' machine.succeed("test -e /zfs_fs"); diff --git a/tests/zfs.nix b/tests/zfs.nix index b024a13..bb29e98 100644 --- a/tests/zfs.nix +++ b/tests/zfs.nix @@ -5,6 +5,7 @@ diskoLib.testLib.makeDiskoTest { inherit pkgs; name = "zfs"; disko-config = ../example/zfs.nix; + extraInstallerConfig.networking.hostId = "8425e349"; extraSystemConfig = { networking.hostId = "8425e349"; fileSystems."/zfs_legacy_fs".options = [ "nofail" ]; # TODO find out why we need this!