mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 11:10:03 +00:00
nixos/tests: don't include switch-to-configuration in DUT by default
This commit is contained in:
parent
7771e0b943
commit
4cfbbb3c1d
|
@ -3,7 +3,7 @@
|
|||
# even in `inheritParentConfig = false` specialisations.
|
||||
{ lib, ... }:
|
||||
let
|
||||
inherit (lib) mkForce;
|
||||
inherit (lib) mkDefault mkForce;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
|
@ -22,6 +22,11 @@ in
|
|||
label = mkForce "test";
|
||||
};
|
||||
}
|
||||
|
||||
({ config, ... }: {
|
||||
# Don't pull in switch-to-configuration by default, except when specialisations are involved.
|
||||
# This is mostly a Hydra optimization, so we don't rebuild all the tests every time switch-to-configuration-ng changes.
|
||||
key = "no-switch-to-configuration";
|
||||
system.switch.enable = mkDefault (config.isSpecialisation || config.specialisation != {});
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue