nixos/all-tests.nix: Set nixpkgs.system

This commit is contained in:
Robert Hensing 2023-05-07 15:38:58 +02:00
parent e5db80ae48
commit cd358fe24e

View file

@ -3,11 +3,9 @@ testModuleArgs@{ config, lib, hostPkgs, nodes, ... }:
let let
inherit (lib) mkOption mkForce optional types mapAttrs mkDefault mdDoc; inherit (lib) mkOption mkForce optional types mapAttrs mkDefault mdDoc;
system = hostPkgs.stdenv.hostPlatform.system;
baseOS = baseOS =
import ../eval-config.nix { import ../eval-config.nix {
inherit system; system = null; # use modularly defined system
inherit (config.node) specialArgs; inherit (config.node) specialArgs;
modules = [ config.defaults ]; modules = [ config.defaults ];
baseModules = (import ../../modules/module-list.nix) ++ baseModules = (import ../../modules/module-list.nix) ++
@ -17,11 +15,16 @@ let
({ config, ... }: ({ config, ... }:
{ {
virtualisation.qemu.package = testModuleArgs.config.qemu.package; virtualisation.qemu.package = testModuleArgs.config.qemu.package;
})
({
config = {
# Ensure we do not use aliases. Ideally this is only set # Ensure we do not use aliases. Ideally this is only set
# when the test framework is used by Nixpkgs NixOS tests. # when the test framework is used by Nixpkgs NixOS tests.
nixpkgs.config.allowAliases = false; 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 testModuleArgs.config.extraBaseModules
]; ];
}; };