From 8a7282f90bae81bbeea36f70ae8604241136cac3 Mon Sep 17 00:00:00 2001 From: K900 Date: Fri, 6 Oct 2023 08:29:58 +0300 Subject: [PATCH] nixosTest: fix tests defined with pkgs.nixosTest --- nixos/lib/testing/nodes.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/lib/testing/nodes.nix b/nixos/lib/testing/nodes.nix index f58759b4cdb..c6ba2a4feac 100644 --- a/nixos/lib/testing/nodes.nix +++ b/nixos/lib/testing/nodes.nix @@ -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;