hyperhive/nix/agent-modules
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 99b141f5f2 matrix: drop the per-agent matrix.enable; accounts are the enable signal
`services.hyperhive.agent.matrix.enable` was a second source of truth for
a fact the account set already carried: after ①-③ the hive-internal
`main` account is an ordinary `matrixAccounts` entry, so "does this agent
have matrix" and "does this agent have an account" were the same question
asked twice, with the boolean able to disagree.

The option is gone and a non-empty `matrixAccounts` now gates the daemon
unit, its token path-watcher and the injected `extraMcpServers.matrix`
entry.

That is only a real condition because `matrixAccounts.main` is itself
gated: it is declared when `matrix.url != null`, never unconditionally. A
`main` with no homeserver is an account the daemon can never log in as,
so declaring one always would have made the signal trivially true and
turned matrix on for every agent in every hive. With the URL gate, the
empty set is reachable exactly for an agent the hive gave no homeserver
and whose operator declared no account of its own — the state the old
`enable = false` expressed.

Assertions: "extras require enable" is deleted, having become the
definition of the thing it checked (an external-only account with its own
homeserver is now rendered rather than rejected). `main.tokenFile` stays
pinned, re-guarded on `? main` instead of on the flag, since `main` is
absent whenever the URL is null and an unguarded index would throw there.

Both spellings of the option get `mkRemovedOptionModule`, following
../host-modules/deploy.nix's registrationTokenFile pair rather than a
silent delete: the definition whose meaning changes is `false`, and left
undeclared it would be ignored and hand the agent the tools its operator
turned off. Failing the eval with the replacement spelling is the only
outcome that cannot.

module-eval gains the three arms — URL, nothing, external-only — with the
middle one carrying why it exists: it is the only thing in the suite that
would notice `main` becoming unconditional again.

Refs #4475
2026-09-18 10:35:16 +02:00
..
agent-service.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
bash-env.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
claude-settings.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
dashboard-links.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
default.nix matrix: drop the per-agent matrix.enable; accounts are the enable signal 2026-09-18 10:35:16 +02:00
docs.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
forge.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
frontend.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
github.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
logs.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
matrix.nix matrix: drop the per-agent matrix.enable; accounts are the enable signal 2026-09-18 10:35:16 +02:00
mcp.nix matrix: drop the per-agent matrix.enable; accounts are the enable signal 2026-09-18 10:35:16 +02:00
network.nix agent-modules/network: accept unicast DHCP renewal replies unconditionally 2026-09-16 19:54:41 +02:00
otel.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
packages.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
queue.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
renamed-options.nix matrix: drop the per-agent matrix.enable; accounts are the enable signal 2026-09-18 10:35:16 +02:00
screen.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
user.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00
weston-vnc.nix nix: move the agent option namespace under services.hyperhive.agent 2026-09-17 20:19:30 +02:00