summary refs log tree commit diff
path: root/nixos/modules/testing
diff options
context:
space:
mode:
authorrnhmjoj <rnhmjoj@inventati.org>2020-10-21 13:02:09 +0200
committerrnhmjoj <rnhmjoj@inventati.org>2020-10-21 16:38:04 +0200
commitbc2188b083dfbbe749a221023e2960b60d4c8951 (patch)
tree2919676a86fbd3a7c08819d07a4c0a40320107a8 /nixos/modules/testing
parentd95b8c33b4b076305cc3479885ff1cab54ca290c (diff)
downloadnixpkgs-bc2188b083dfbbe749a221023e2960b60d4c8951.tar
nixpkgs-bc2188b083dfbbe749a221023e2960b60d4c8951.tar.gz
nixpkgs-bc2188b083dfbbe749a221023e2960b60d4c8951.tar.bz2
nixpkgs-bc2188b083dfbbe749a221023e2960b60d4c8951.tar.lz
nixpkgs-bc2188b083dfbbe749a221023e2960b60d4c8951.tar.xz
nixpkgs-bc2188b083dfbbe749a221023e2960b60d4c8951.tar.zst
nixpkgs-bc2188b083dfbbe749a221023e2960b60d4c8951.zip
nixos: fix qemu_test being used in normal VMs
This is an attempt to fixup PR #49403.
Diffstat (limited to 'nixos/modules/testing')
-rw-r--r--nixos/modules/testing/test-instrumentation.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix
index dbbcb0bed5b..e9f5eac7f5f 100644
--- a/nixos/modules/testing/test-instrumentation.nix
+++ b/nixos/modules/testing/test-instrumentation.nix
@@ -51,7 +51,10 @@ with import ../../lib/qemu-flags.nix { inherit pkgs; };
     #       we avoid defining consoles if not possible.
     # TODO: refactor such that test-instrumentation can import qemu-vm
     #       or declare virtualisation.qemu.console option in a module that's always imported
-    virtualisation = lib.optionalAttrs (options ? virtualisation.qemu.consoles) { qemu.consoles = [ qemuSerialDevice ]; };
+    virtualisation.qemu = {
+      consoles = lib.optional (options ? virtualisation.qemu.consoles) qemuSerialDevice;
+      package  = pkgs.qemu_test;
+    };
 
     boot.initrd.preDeviceCommands =
       ''