diff --git a/nix/modules/hive-gateway.nix b/nix/modules/hive-gateway.nix index 6f63acbf..ae787d37 100644 --- a/nix/modules/hive-gateway.nix +++ b/nix/modules/hive-gateway.nix @@ -279,6 +279,16 @@ in } ]; + # Ensure the per-agent UDS bind-mount source exists at host boot, + # before the gateway container's first start. nspawn would + # auto-create an empty dir if missing (argus 🟡 on #829), but a + # tmpfiles rule makes the intent explicit and dodges the + # fresh-boot-before-any-agent-spawn window where the dir wouldn't + # exist yet from c0re's per-agent `set_nspawn_flags` mkdir chain. + systemd.tmpfiles.rules = [ + "d /run/hive-agent 0755 root root - -" + ]; + containers.hive-gateway = { autoStart = true; ephemeral = false;