From cd358fe24eb50358ef5a72c35c92adc62f984ff3 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 7 May 2023 15:38:58 +0200 Subject: [PATCH] nixos/all-tests.nix: Set nixpkgs.system --- nixos/lib/testing/nodes.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/nixos/lib/testing/nodes.nix b/nixos/lib/testing/nodes.nix index c538ab468c52..e9649e724c35 100644 --- a/nixos/lib/testing/nodes.nix +++ b/nixos/lib/testing/nodes.nix @@ -3,11 +3,9 @@ testModuleArgs@{ config, lib, hostPkgs, nodes, ... }: let inherit (lib) mkOption mkForce optional types mapAttrs mkDefault mdDoc; - system = hostPkgs.stdenv.hostPlatform.system; - baseOS = import ../eval-config.nix { - inherit system; + system = null; # use modularly defined system inherit (config.node) specialArgs; modules = [ config.defaults ]; baseModules = (import ../../modules/module-list.nix) ++ @@ -17,11 +15,16 @@ let ({ config, ... }: { virtualisation.qemu.package = testModuleArgs.config.qemu.package; - + }) + ({ + config = { # 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; - }) + # TODO: switch to nixpkgs.hostPlatform and make sure containers-imperative test still evaluates. + nixpkgs.system = hostPkgs.stdenv.hostPlatform.system; + }; + }) testModuleArgs.config.extraBaseModules ]; };