Files
nixos/modules
oqyude 4f69d96e4e fix(pxe-infra): use tap+bridge-attach instead of -netdev bridge
QEMU's `-netdev bridge,br=pxe0` delegates the actual
`brctl addif` to a setuid qemu-bridge-helper binary, paired
with an /etc/qemu/bridge.conf ACL file. The current nixpkgs
does not ship a NixOS module for installing that wrapper
(nixpkgs has qemu-guest-agent.nix — a different thing, the
in-VM guest agent) so the default is to fail with:

  failed to parse default acl file /etc/qemu/bridge.conf
  -netdev bridge,…: bridge helper failed

The standard workaround is the same pattern NixOS itself
uses in qemu-vm.nix for test VMs: create a tap device
before QEMU starts, attach it to the bridge ourselves (we
already have CAP_NET_ADMIN as root in the systemd unit),
and pass `-netdev tap,ifname=…` to QEMU. No helper needed.

- modules/pxe-infra/vm.nix: switch to `-netdev tap,
  ifname=pxe0-tap`; pre-start script idempotently tears
  down any leftover tap, creates a new one, and attaches
  it to the configured bridge. `postStop` removes the tap
  on every stop (including crashes / restart cycles).
- modules/pxe-infra/bridge.nix: drop the no-op
  `services.qemuGuest.enable = true;` (option doesn't exist
  in this nixpkgs).
2026-10-13 03:25:12 +03:00
..
2026-09-02 23:32:34 +03:00
2026-10-09 16:37:03 +03:00
2026-08-11 04:03:42 +03:00
2026-08-11 22:13:53 +03:00
2026-10-01 15:14:37 +03:00