Merge pull request #259318 from K900/fix-externally-defined-nixos-tests

nixosTest: fix tests defined with pkgs.nixosTest
This commit is contained in:
K900 2023-10-06 18:04:29 +03:00 committed by GitHub
commit 944e26dc60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,9 +28,9 @@ let
{
virtualisation.qemu.package = testModuleArgs.config.qemu.package;
})
(optionalAttrs (!config.node.pkgsReadOnly) {
({ options, ... }: {
key = "nodes.nix-pkgs";
config = {
config = mkIf (!options.nixpkgs.pkgs.isDefined) {
# Ensure we do not use aliases. Ideally this is only set
# when the test framework is used by Nixpkgs NixOS tests.
nixpkgs.config.allowAliases = false;