nix: pivot to services.hyperhive.* per mara directive (#612)

Per [mara on PR #615 comment 7349](http://localhost:3000/hyperhive/hyperhive/pulls/615#issuecomment-7349):
> follow nix conventions, services.hyperhive it is. the earlier we
> change this, the less breakage.

Renames the entire host-side option tree under `services.hyperhive.*`:

- `services.hive-c0re.*` → `services.hyperhive.c0re.*`
- `hyperhive.enable` → `services.hyperhive.enable`
- `hyperhive.domain` → `services.hyperhive.domain`
- `hyperhive.forge.*` → `services.hyperhive.forge.*`
- `hyperhive.matrix.*` → `services.hyperhive.matrix.*`

Per mara's "earlier = less breakage", the previous `services.hive-c0re.enable`
deprecation alias is dropped. Operators get a clear eval error on the
old paths pointing at the rename. Single migration moment.

Per-agent options in `nix/templates/harness-base.nix` (`hyperhive.model`,
`hyperhive.allowedRecipients`, etc.) stay at `hyperhive.*` — they're
container-level config, not services in the NixOS sense.

Verified via `nix flake check --no-build` + an end-to-end NixOS eval
exercising every renamed path.

Follow-up needed: rust source comments referencing the old NixOS
option names (`hive-c0re/src/{meta,coordinator,main,dashboard}.rs`)
should be updated in a separate pure-rust PR to keep this one
strictly nix-only.
This commit is contained in:
atlas 2026-05-30 10:32:04 +02:00 committed by Mara
commit 3b500bba1b
7 changed files with 136 additions and 151 deletions

View file

@ -61,8 +61,8 @@ Minimal `flake.nix` for a host that runs hive-c0re:
modules = [
hyperhive.nixosModules.default # hive-c0re + hive-forge in one import
({ ... }: {
hyperhive.enable = true;
# hyperhive.c0re.operatorPronouns = "they/them"; # default: "she/her"
services.hyperhive.enable = true;
# services.hyperhive.c0re.operatorPronouns = "they/them"; # default: "she/her"
# ... rest of your host config
system.stateVersion = "25.11";
@ -78,7 +78,7 @@ manager container, and auto-rebuilds any container whose hyperhive
rev goes stale. `claude-code` is unfree — hyperhive scopes the
whitelist to itself, nothing for the operator to set.
Optional: set `hyperhive.c0re.preBuildAgentTemplates = true;`
Optional: set `services.hyperhive.c0re.preBuildAgentTemplates = true;`
to pre-fetch the per-container system closures into your host's
/nix/store as part of `nixos-rebuild`. First-agent-spawn then
completes in seconds instead of minutes (no nixpkgs/claude-code
@ -88,19 +88,20 @@ system closure. Off by default (the toplevels are pinned to
Alternatively warm the store manually:
`nix build git+https://forge.darkest.space/hyperhive/hyperhive#agent-base-toplevel`.
Optional: set `hyperhive.domain = "example.com";` to define the
Optional: set `services.hyperhive.domain = "example.com";` to define the
canonical hostname for hyperhive subsystems that need a stable public
name. No default — subsystems that require it (currently:
`hyperhive.matrix`) assert non-null at eval time with a clear error
message if it is missing.
`services.hyperhive.matrix`) assert non-null at eval time with a clear
error message if it is missing.
Optional: set `hyperhive.matrix.enable = true;` to spin up a private
[matrix-tuwunel](https://github.com/matrix-construct/tuwunel) homeserver
in a nixos-container. Requires either `hyperhive.domain` or
`hyperhive.matrix.serverName` to be set (eval fails with a clear error
if both are absent). The `server_name` (embedded irrevocably in every
user and room ID) defaults to `matrix.<domain>`; override with
`hyperhive.matrix.serverName = "chat.example.com";` if needed. State
Optional: set `services.hyperhive.matrix.enable = true;` to spin up a
private [matrix-tuwunel](https://github.com/matrix-construct/tuwunel)
homeserver in a nixos-container. Requires either
`services.hyperhive.domain` or `services.hyperhive.matrix.serverName`
to be set (eval fails with a clear error if both are absent). The
`server_name` (embedded irrevocably in every user and room ID)
defaults to `matrix.<domain>`; override with
`services.hyperhive.matrix.serverName = "chat.example.com";` if needed. State
lives at `/var/lib/nixos-containers/hive-matrix/`. Federation is
enabled with an empty `trusted_servers` list; e2ee is deferred to
a follow-up (#551).