mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
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] bc2188b083
This commit is contained in:
parent
972ba804fd
commit
aab534b894
2 changed files with 7 additions and 2 deletions
|
@ -6,7 +6,12 @@
|
||||||
let
|
let
|
||||||
nodes = builtins.mapAttrs (vm: module: {
|
nodes = builtins.mapAttrs (vm: module: {
|
||||||
_file = "${networkExpr}@node-${vm}";
|
_file = "${networkExpr}@node-${vm}";
|
||||||
imports = [ module ];
|
imports = [
|
||||||
|
module
|
||||||
|
({ pkgs, ... }: {
|
||||||
|
virtualisation.qemu.package = pkgs.qemu;
|
||||||
|
})
|
||||||
|
];
|
||||||
}) (import networkExpr);
|
}) (import networkExpr);
|
||||||
in
|
in
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ with import ../../lib/qemu-flags.nix { inherit pkgs; };
|
||||||
# or declare virtualisation.qemu.console option in a module that's always imported
|
# or declare virtualisation.qemu.console option in a module that's always imported
|
||||||
virtualisation.qemu = {
|
virtualisation.qemu = {
|
||||||
consoles = lib.optional (options ? virtualisation.qemu.consoles) qemuSerialDevice;
|
consoles = lib.optional (options ? virtualisation.qemu.consoles) qemuSerialDevice;
|
||||||
package = pkgs.qemu_test;
|
package = lib.mkDefault pkgs.qemu_test;
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.preDeviceCommands =
|
boot.initrd.preDeviceCommands =
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue