nixpkgs/nixos/modules
Maximilian Bosch 60e731d1ce
nixos/qemu-vm: fix running VM with QEMU_NET_OPTS
I realized quite recently that running a test VM - as documented in the
manual - like

    QEMU_NET_OPTS='hostfwd=tcp::8080-:80'  ./result/bin/nixos-run-vms

doesn't work anymore on `master`. After bisecting I realized that the
introduction of a forward-port option[1] is the problem since it adds a
trailing comma even if no forwarding options are specified via
`virtualisation.forwardPorts`. In that case, the networking options
would look like `-netdev user,id=user.0,,hostfwd=tcp::8080-:80' which
confused QEMU and thus the VM refused to start.

Now, the trailing comma is only added if additional port forwards are
specified declaratively.

[1] b8bfc81d5b
2021-10-06 22:40:30 +02:00
..
config nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
hardware nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
i18n/input-method nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
installer nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
misc Merge pull request #139765 from eyJhb/bitlbee-user-group 2021-10-06 08:57:33 +02:00
profiles NixOS AWS AMI: enable the serial console on ttyS0 2021-08-20 12:42:02 -04:00
programs Merge pull request #140359 from rnhmjoj/setgid-nobody 2021-10-06 08:36:35 +02:00
security nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
services Merge pull request #139765 from eyJhb/bitlbee-user-group 2021-10-06 08:57:33 +02:00
system Merge pull request #139754 from eyJhb/networkd-iaid 2021-10-05 10:06:05 +02:00
tasks nixos/doc: clean up defaults and examples 2021-10-04 12:47:20 +02:00
testing nixos/lib/qemu-flags: rename to qemu-common 2021-09-18 16:58:16 +02:00
virtualisation nixos/qemu-vm: fix running VM with QEMU_NET_OPTS 2021-10-06 22:40:30 +02:00
module-list.nix nixos/htop: add module 2021-10-05 06:00:43 +02:00
rename.nix treewide: yank wicd as it is abandoned 2021-09-11 23:46:52 +02:00