hyperhive/nix
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas bb53032897 fix(#3372): grafana serves a unix socket instead of taking a port
Per the operator's call on #3372: rather than moving Grafana off the
forge's 3000 to another number, take it off TCP entirely.

The collision was possible because every swarm service container shares
the host's network namespace, which makes a port a swarm-wide resource
two modules can each claim believing it free — Grafana took upstream's
3000, so does the forge, and `grafana.<swarm-domain>` served the forge
with no bind error and nothing in any log. A socket has a path, and a
path collision is a build-time conflict rather than a runtime coin toss.

Three parts, none of which works alone:

- `protocol = "socket"` with `socket_gid` = nginx's static gid 60.
- Grafana joins that gid inside the container. A non-root process may
  only chgrp to a group it belongs to, and a container has its own user
  database — without the membership Grafana starts, the chown fails, and
  the socket is simply unreachable.
- The socket dir is created host-side by tmpfiles and bind-mounted in. A
  container's /run is an nspawn tmpfs, so it is not visible from the host
  at /var/lib/nixos-containers/<name>/run; the same shape the per-agent
  web.sock already uses.

The `port` option is gone rather than deprecated — nothing can set it to
a colliding value if it does not exist.
2026-08-16 23:21:00 +02:00
..
agent-modules agent icon: 404 when unconfigured, client-side fallback 2026-08-10 20:59:59 +02:00
docs refactor(nix): move the matrix host options under services.hyperhive.swarm 2026-08-05 13:45:09 +02:00
host-modules fix(#3372): grafana serves a unix socket instead of taking a port 2026-08-16 23:21:00 +02:00
packages wire swarm-authelia-bridge: systemd unit, oidc client, controller auth env 2026-08-16 22:38:40 +02:00
templates refactor: nix/host-modules + nix/agent-modules layout, update doc paths 2026-07-13 22:05:49 +02:00
checks.nix nix: stop restating the npm-deps-hash regenerate command in 3 places 2026-08-16 15:57:22 +02:00
devshell.nix refactor: slim flake.nix into nix/ entry files 2026-07-13 20:55:43 +02:00
module-eval.nix nix: fix shallow-merge drop in module-eval's hive stub helper 2026-08-14 09:55:19 +02:00
rust.nix docs(rust): the dep-cache comment no longer describes two consumers 2026-08-11 22:29:56 +02:00
sources.nix refactor: slim flake.nix into nix/ entry files 2026-07-13 20:55:43 +02:00
treefmt.nix refactor: slim flake.nix into nix/ entry files 2026-07-13 20:55:43 +02:00