nixos: fix qemu_test being used in normal VMs

This is an attempt to fixup PR #49403.
This commit is contained in:
rnhmjoj
2020-10-21 13:02:09 +02:00
parent d95b8c33b4
commit bc2188b083
3 changed files with 14 additions and 6 deletions

View File

@@ -14,10 +14,11 @@ with import ../../lib/qemu-flags.nix { inherit pkgs; };
let
qemu = config.system.build.qemu or pkgs.qemu_test;
cfg = config.virtualisation;
qemu = cfg.qemu.package;
consoles = lib.concatMapStringsSep " " (c: "console=${c}") cfg.qemu.consoles;
driveOpts = { ... }: {
@@ -401,6 +402,14 @@ in
};
virtualisation.qemu = {
package =
mkOption {
type = types.package;
default = pkgs.qemu;
example = "pkgs.qemu_test";
description = "QEMU package to use.";
};
options =
mkOption {
type = types.listOf types.unspecified;