From 924ddc550817799a55ffd12f95310e622e2344cb Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 26 Mar 2026 14:11:16 +0100 Subject: [PATCH 1/3] nixos/release: always add config.driver to `allDrivers` --- nixos/release.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/release.nix b/nixos/release.nix index 0fcc22981be5..2778972742c9 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -59,7 +59,7 @@ let callTest = config: if attrNamesOnly then - hydraJob config.test + hydraJob config.driver else { ${system} = hydraJob config.driver; From 2bf826c902e462d54a22e6302dc5079d2dfc4b74 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 26 Mar 2026 12:47:43 +0100 Subject: [PATCH 2/3] nixos/release: respect `meta.hydraPlatforms` from NixOS tests E.g. nspawn tests are not supported on the official NixOS infrastructure currently. --- nixos/release.nix | 34 ++++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/nixos/release.nix b/nixos/release.nix index 2778972742c9..3d750086cf4b 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -43,12 +43,17 @@ let pkgs = import ./.. { inherit system; }; callTest = config: - if attrNamesOnly then - hydraJob config.test - else - { - ${system} = hydraJob config.test; - }; + let + inherit (config) test; + in + lib.optionalAttrs (builtins.elem system (getPlatforms test)) ( + if attrNamesOnly then + hydraJob test + else + { + ${system} = hydraJob test; + } + ); } // { # for typechecking of the scripts and evaluation of @@ -58,12 +63,17 @@ let pkgs = import ./.. { inherit system; }; callTest = config: - if attrNamesOnly then - hydraJob config.driver - else - { - ${system} = hydraJob config.driver; - }; + let + inherit (config) driver; + in + lib.optionalAttrs (builtins.elem system (getPlatforms driver)) ( + if attrNamesOnly then + hydraJob driver + else + { + ${system} = hydraJob driver; + } + ); }; }; From ec2c7515b3f23ac535d05e7675ce2a56a2abd559 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 26 Mar 2026 12:50:02 +0100 Subject: [PATCH 3/3] nixos/tests: don't build nspawn tests on hydra.nixos.org --- nixos/tests/nixos-test-driver/containers.nix | 2 ++ nixos/tests/test-containers-bittorrent.nix | 2 ++ 2 files changed, 4 insertions(+) diff --git a/nixos/tests/nixos-test-driver/containers.nix b/nixos/tests/nixos-test-driver/containers.nix index 073e2de28bd6..6f27a59255fa 100644 --- a/nixos/tests/nixos-test-driver/containers.nix +++ b/nixos/tests/nixos-test-driver/containers.nix @@ -2,6 +2,8 @@ { name = "containers"; meta.maintainers = with pkgs.lib.maintainers; [ jfly ]; + # https://github.com/NixOS/infra/issues/987 + meta.hydraPlatforms = [ ]; nodes = { n1 = { diff --git a/nixos/tests/test-containers-bittorrent.nix b/nixos/tests/test-containers-bittorrent.nix index aeac191cdc2e..478f76dadd34 100644 --- a/nixos/tests/test-containers-bittorrent.nix +++ b/nixos/tests/test-containers-bittorrent.nix @@ -51,6 +51,8 @@ in maintainers = [ lib.maintainers.kmein ]; + # https://github.com/NixOS/infra/issues/987 + hydraPlatforms = [ ]; }; containers = {