nixos/vm: enable qemu network bridge

This commit is contained in:
2026-05-02 21:56:19 +02:00
parent 500b17237e
commit be40620840
2 changed files with 24 additions and 0 deletions
+6
View File
@@ -1,8 +1,14 @@
{ lib, ... }:
{
virtualisation.vmVariant.virtualisation = {
cores = 2;
diskSize = 8192;
graphics = false;
memorySize = 4096;
qemu.networkingOptions = lib.mkForce [
"-nic bridge,br=virbr0,id=hn0,model=virt-net-pci,helper=\${QEMU_BRIDGE_HELPER_PATH}"
"-device virtio-net-pci,netdev=hn0,id=nic1,\${QEMU_NET_OPTS:+,$QEMU_NET_OPTS}"
];
};
}