diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 753cefb9bbe0..504aabae0d99 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -699,7 +699,7 @@ in { nixops = handleTest ./nixops/default.nix {}; nixos-generate-config = handleTest ./nixos-generate-config.nix {}; nixos-rebuild-install-bootloader = handleTestOn ["x86_64-linux"] ./nixos-rebuild-install-bootloader.nix {}; - nixos-rebuild-specialisations = handleTestOn ["x86_64-linux"] ./nixos-rebuild-specialisations.nix {}; + nixos-rebuild-specialisations = runTestOn ["x86_64-linux"] ./nixos-rebuild-specialisations.nix; nixos-rebuild-target-host = runTest ./nixos-rebuild-target-host.nix; nixpkgs = pkgs.callPackage ../modules/misc/nixpkgs/test.nix { inherit evalMinimalConfig; }; nixseparatedebuginfod = handleTest ./nixseparatedebuginfod.nix {}; diff --git a/nixos/tests/nixos-rebuild-specialisations.nix b/nixos/tests/nixos-rebuild-specialisations.nix index ab67bbaba676..f12d0fc48ce9 100644 --- a/nixos/tests/nixos-rebuild-specialisations.nix +++ b/nixos/tests/nixos-rebuild-specialisations.nix @@ -1,6 +1,10 @@ -import ./make-test-python.nix ({ pkgs, ... }: { +{ hostPkgs, ... }: { name = "nixos-rebuild-specialisations"; + # TODO: remove overlay from nixos/modules/profiles/installation-device.nix + # make it a _small package instead, then remove pkgsReadOnly = false;. + node.pkgsReadOnly = false; + nodes = { machine = { lib, pkgs, ... }: { imports = [ @@ -32,7 +36,7 @@ import ./make-test-python.nix ({ pkgs, ... }: { testScript = let - configFile = pkgs.writeText "configuration.nix" '' + configFile = hostPkgs.writeText "configuration.nix" '' { lib, pkgs, ... }: { imports = [ ./hardware-configuration.nix @@ -119,4 +123,4 @@ import ./make-test-python.nix ({ pkgs, ... }: { machine.fail("nixos-rebuild boot --specialisation foo") machine.fail("nixos-rebuild boot -c foo") ''; -}) +}