You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
vivarium: a guest that vsock cannot serve goes behind the router by default #1521
Part of the uplink after passt (#1404). passt and gvproxy are deprecated, but passt is still the default for a guest that is not NixOS, because the in-guest relay of uplink.proxy = "vsock" is a NixOS module.
Measured 2026-11-18: such a guest needs no change to work behind the router. checks.suse-router (openSUSE Leap's cloud image, UML) leases its uplink address from the router by its MAC and reaches the host's loopback through the relay, sandboxed and by hand.
Proposal: router.enable defaults to true when any guest takes neither vsock nor an uplink.segment. Such a guest's uplink.proxy default then becomes router, not passt.
To check first: reading each node's kind in the run's router.enable default without an evaluation cycle (a node's uplink.proxy default reads router.enable).
Not here: container guests, which take vsock through unix sockets (separate issue), and console guests with no DHCP client on their first NIC.
Decision (User, 2026-11-18): the automatic router puts every guest of the run behind it, as router.enable = true does today.
Kinds opt in once measured to lease vec0 by DHCP: image now (suse-router), routeros after its checks pass behind the router. vyos (unmanaged vec0 off OOB) and dinix (no uplink yet) stay out. sonic and appliance are unmeasured.
Shape, to avoid the cycle: in modules/run.nix both nodes (the router entry) and defaults are mkIf router.enable, so reading any guest forces router.enable. Plan:
A guest option set by its kind module, true for image: its uplink needs the router.
router.enable becomes nullOr bool, default null (automatic). lib.nix resolves it: the explicit value, else macOS as today, else any guest that needs the router.
lib.nix adds the router node beside cfg.nodes, and the guests take the resolved value through a module argument, not through a mkIf on defaults. Laziness then holds: the new option reads no proxy and no index.
Activity
Lillecarl commentedon Nov 18, 2026
Decision (User, 2026-11-18): the automatic router puts every guest of the run behind it, as
router.enable = truedoes today.Kinds opt in once measured to lease
vec0by DHCP:imagenow (suse-router),routerosafter its checks pass behind the router.vyos(unmanagedvec0off OOB) anddinix(no uplink yet) stay out.sonicandapplianceare unmeasured.Shape, to avoid the cycle: in
modules/run.nixbothnodes(the router entry) anddefaultsaremkIf router.enable, so reading any guest forcesrouter.enable. Plan:image: its uplink needs the router.router.enablebecomesnullOr bool, defaultnull(automatic).lib.nixresolves it: the explicit value, else macOS as today, else any guest that needs the router.lib.nixadds the router node besidecfg.nodes, and the guests take the resolved value through a module argument, not through amkIfondefaults. Laziness then holds: the new option reads no proxy and no index.Assisted-By: Claude Opus 5.5
vivarium: read wantsRouter from the guest as it is without a router
vivarium: put RouterOS behind the automatic router