hyperhive/nix/host-modules
Repository files (latest commit first)
Filename Latest commit message Latest commit date
iris 4828c96957 swarm-controller: OpenAPI spec + gateway swagger UI wiring
Rust half mirrors hive-c0re/src/dashboard/mod.rs's utoipa pattern
exactly: an ApiDoc root, #[utoipa::path(...)] on /health (the one
existing route), and a raw JSON route at /api/openapi.json served
via OpenApiRouter::split_for_parts(). Only annotated routes appear
in the spec.

Gateway wiring extends the swarm-UI vhost (the only vhost swarm-
controller is reachable from) with:
- /api/ — proxied to the controller's unix socket untouched (no URI
  segment after the socket path), so a route swarm-controller
  registers is the path nginx forwards, no prefix-stripping to keep
  in sync by hand.
- /api/docs/ (+ the bare /api/docs redirect) — the same
  swagger-ui-theme dist the per-hive dashboard already serves at its
  own /api/docs/, reused as-is since it's generic.

Both new locations reuse the same auth_request block the vhost's own
'/' already applies, factored into a shared swarmAuthRequest string —
auth_request does not inherit across sibling nginx locations, so
without this the page itself would be gated while its own API and
API docs sat open.

cargo test -p swarm-controller + cargo clippy --all-targets both
clean. Verified the new nginx wiring evaluates correctly with a
throwaway nixosSystem eval (services.hyperhive.swarm.{controller,ui}
enabled): /api/ proxies to the socket, /api/docs redirects, and both
require auth_request the same as the vhost root.

Fixes hyperhive#3212
2026-08-12 21:36:01 +02:00
..
hive-c0re fix(3191): let hive-c0re write the gateway conf dir under strict sandboxing 2026-08-12 16:39:58 +02:00
hive-forge fix(3149): the forge container can resolve the authelia name 2026-08-12 21:09:21 +02:00
hive-gateway swarm-controller: OpenAPI spec + gateway swagger UI wiring 2026-08-12 21:36:01 +02:00
lib feat(nix): issue each hive's CA under a swarm root CA 2026-08-05 15:57:50 +02:00
default.nix feat(3167): options + certificate name for the swarm UI 2026-08-12 17:29:13 +02:00
hive-ci.nix feat(nix): move the forge host options under services.hyperhive.swarm 2026-08-05 03:44:53 +02:00
hive-matrix.nix docs(3191): drop the migration history from the gateway comments 2026-08-12 13:26:58 +02:00
hive-network.nix docs(3191): the gateway's comments describe a host service, not a container 2026-08-12 12:20:28 +02:00
hive-priv.nix fix(#2573): also add /etc/tmpfiles.d to hive-priv ReadWritePaths (same EROFS class) 2026-07-18 16:39:20 +02:00
hive-tls.nix docs(3191): drop the migration history from the gateway comments 2026-08-12 13:26:58 +02:00
hyperhive.nix refactor(nix): a hive's domain comes out of the swarm directory 2026-08-05 22:43:17 +02:00
local-defaults.nix feat(3089): all-local asserts the swarm controller 2026-08-11 23:50:19 +02:00
otel.nix refactor: nix/host-modules + nix/agent-modules layout, update doc paths 2026-07-13 22:05:49 +02:00
swarm-authelia.nix docs(3167): the setup guide gains a swarm UI step, and one group name 2026-08-12 17:57:52 +02:00
swarm-ca.nix fix(nix): a missing swarm-services leaf must not kill the whole gateway 2026-08-06 00:30:22 +02:00
swarm-controller.nix docs(3191): the gateway's comments describe a host service, not a container 2026-08-12 12:20:28 +02:00
swarm-peers-removed.nix refactor(nix): swarm.peers becomes swarm.hives, a directory of every hive 2026-08-05 20:44:16 +02:00
swarm-required-services.nix refactor(nix): make all-local a deployment mode, not a default 2026-08-05 19:41:11 +02:00
swarm-snapshot-store.nix refactor(#2862): keep the option at services.hyperhive.snapshotStore 2026-07-31 19:03:24 +02:00
swarm-ui.nix fix(3167): wire the swarm-ui package from the flake, not a pkgs attr 2026-08-12 17:49:21 +02:00
swarm-wireguard.nix refactor(nix): swarm.peers becomes swarm.hives, a directory of every hive 2026-08-05 20:44:16 +02:00
swarm.nix feat(3167): options + certificate name for the swarm UI 2026-08-12 17:29:13 +02:00