hyperhive/nix
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 5809077924 matrix: deliver an appservice registration to the homeserver
The hive creates matrix accounts with a shared registration token today,
which means the secret that authorises account creation has to reach both
hive-c0re and tuwunel and stay identical in both. An appservice
registration replaces that with an identity: one token that says "this is
the hive's provisioner", carried in an ordinary credential file.

`url = null`, so nothing is served and no daemon is introduced — with no
URL the homeserver never calls out, and the registration exists purely to
give the `as_token` meaning.

Delivered through `appservice_dir` rather than a `[global.appservice.<id>]`
stanza, because a stanza's `as_token` would be a nix literal and a nix
literal is a world-readable store path. The file is minted and rendered by
a host activation script, bind-mounted into the container, and handed to
the homeserver by `LoadCredential` — the same two steps the registration
token and the OIDC client secret already take, and for the same reason
(0600 root on the host, `DynamicUser=true` in the container).

`sender_localpart` is the hive admin account on purpose: loading a
registration creates its sender user on a zero-user database inside
`Services::start()`, and the `admin_execute` promotion runs after that and
still before the HTTP listener accepts anything. So a fresh homeserver has
a joined, power-level-100 admin on its first boot without anyone having
won the first-registered-user grant. `admin_execute_errors_ignore` is set
because a failing startup command otherwise aborts startup outright.

Nothing reads the registration yet — hive-c0re still provisions through
the registration token, which is untouched here.

Refs #4402
2026-09-15 19:21:15 +02:00
..
agent-modules subagent: let the daemon see the tool groups it resolves --tools from 2026-09-15 17:40:27 +02:00
docs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
host-modules matrix: deliver an appservice registration to the homeserver 2026-09-15 19:21:15 +02:00
packages swarm-ui: make it installable as a PWA 2026-09-12 11:30:20 +02:00
templates refactor: nix/host-modules + nix/agent-modules layout, update doc paths 2026-07-13 22:05:49 +02:00
checks.nix hive-forge: add markdown-docs generator and CI freshness check 2026-09-02 19:38:34 +02:00
devshell.nix devshell: carry vale, so the CI prose lint is a local gate too 2026-09-13 12:25:47 +02:00
module-eval.nix swarm: publish each agent's turn-state header on its own subject 2026-09-14 15:12:23 +02:00
reserved-hive-fragments.nix swarm: extract the name guards, so the module just says what is forbidden 2026-08-31 18:50:15 +02:00
reserved-names.nix refactor(hive-c0re): drop the request_init_config tool and InitConfig approval 2026-09-14 19:03:44 +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 treefmt: format the web files with prettier 2026-09-02 15:25:07 +02:00