drop the hive-side matrix code: sweep, hivectl matrix and the apiUrl option
This commit is contained in:
parent
a00bcb8c05
commit
6dbb18b6d4
1 changed files with 49 additions and 1007 deletions
|
|
@ -12,6 +12,12 @@ let
|
|||
swarmDomain = config.services.hyperhive.swarm.domain;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(lib.mkRemovedOptionModule [ "services" "hyperhive" "swarm" "matrix" "apiUrl" ] ''
|
||||
hive-c0re no longer talks to matrix, so it has no API URL to set: matrix is swarm-level.
|
||||
'')
|
||||
];
|
||||
|
||||
options.services.hyperhive.swarm.matrix = {
|
||||
serverName = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
|
|
@ -49,37 +55,6 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
apiUrl = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = if cfg.gatewayHost == null then null else "https://${cfg.gatewayHost}";
|
||||
defaultText = lib.literalExpression ''
|
||||
if services.hyperhive.swarm.matrix.gatewayHost == null then null
|
||||
else "https://''${services.hyperhive.swarm.matrix.gatewayHost}"
|
||||
'';
|
||||
example = "https://matrix.example.com";
|
||||
description = ''
|
||||
Client-server API base URL **hive-c0re itself** uses to
|
||||
provision matrix (register agent users, invite members). Distinct from the agent-facing
|
||||
`services.hyperhive.agent.matrix.url`, which is the gateway vhost handed to
|
||||
each agent's `hive-matrix-daemon`.
|
||||
|
||||
Defaults to `https://` on the homeserver's gateway vhost
|
||||
(`gatewayHost`), the same name on every hive whichever host runs
|
||||
tuwunel, and `null` when there is no vhost. hive-c0re logs in
|
||||
with the hive's matrix sender token over this URL, so it crosses
|
||||
the network whenever hive-c0re is not on the homeserver's host:
|
||||
an `http://` value sends that token in cleartext. hive-c0re
|
||||
verifies the gateway's certificate against the hive trust bundle
|
||||
(system CAs plus the swarm and services roots).
|
||||
|
||||
`null` means hive-c0re has no homeserver to provision against
|
||||
and matrix provisioning no-ops. There is deliberately no
|
||||
fallback compiled into the daemon: an address baked into the
|
||||
binary is one that builds fine and then talks to the wrong
|
||||
machine.
|
||||
'';
|
||||
};
|
||||
|
||||
gatewayHost = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
# `chat.` under the SWARM domain — both halves change: a swarm runs
|
||||
|
|
|
|||
Loading…
Reference in a new issue