From aab534b894c60e69199aba4cc57b8b3f8fd1a8c2 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Fri, 23 Oct 2020 17:33:10 +0200 Subject: nixos/nixos-build-vms: use `pkgs.qemu` for virtualisation When I test a change e.g. in the module system manually, I usually use `nixos-build-vms(8)` which also gives me a QEMU window where I can play around in the freshly built VM. It seems as this has changed recently when the default package for non-interactive VM tests using the same framework was switched to `pkgs.qemu_test` to reduce the closure size. While this is a reasonable decision for our CI tests, I think that you really want a QEMU window of the VM by default when using `nixos-build-vms(8)`. [1] bc2188b083dfbbe749a221023e2960b60d4c8951 --- nixos/modules/installer/tools/nixos-build-vms/build-vms.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'nixos/modules/installer/tools/nixos-build-vms/build-vms.nix') diff --git a/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix b/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix index 0c9f8522cc1..199e5f9206b 100644 --- a/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix +++ b/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix @@ -6,7 +6,12 @@ let nodes = builtins.mapAttrs (vm: module: { _file = "${networkExpr}@node-${vm}"; - imports = [ module ]; + imports = [ + module + ({ pkgs, ... }: { + virtualisation.qemu.package = pkgs.qemu; + }) + ]; }) (import networkExpr); in -- cgit 1.4.1 From d4fb7daafdc694d01befebe7d941bfd729568ccb Mon Sep 17 00:00:00 2001 From: Andreas Rammhold Date: Sun, 25 Oct 2020 00:59:59 +0200 Subject: nixos-build-vms: use the driverInteractive attribute instead This reverts commit aab534b894c60e69199aba4cc57b8b3f8fd1a8c2 & uses the driverInteractive attribute for the test driver instead. This has the same effect but removes the extra module in the nixos-build-vms code. --- nixos/modules/installer/tools/nixos-build-vms/build-vms.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'nixos/modules/installer/tools/nixos-build-vms/build-vms.nix') diff --git a/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix b/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix index 199e5f9206b..e49ceba2424 100644 --- a/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix +++ b/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix @@ -6,12 +6,7 @@ let nodes = builtins.mapAttrs (vm: module: { _file = "${networkExpr}@node-${vm}"; - imports = [ - module - ({ pkgs, ... }: { - virtualisation.qemu.package = pkgs.qemu; - }) - ]; + imports = [ module ]; }) (import networkExpr); in @@ -20,4 +15,4 @@ with import ../../../../lib/testing-python.nix { pkgs = import ../../../../.. { inherit system config; }; }; -(makeTest { inherit nodes; testScript = ""; }).driver +(makeTest { inherit nodes; testScript = ""; }).driverInteractive -- cgit 1.4.1