hive-matrix: always use matrix.<domain> subdomain (mara on #552)
This commit is contained in:
parent
5a4eb3e053
commit
b652e6a6b0
1 changed files with 6 additions and 24 deletions
|
|
@ -8,12 +8,7 @@ let
|
|||
cfg = config.hyperhive.matrix;
|
||||
hyperhiveDomain = config.hyperhive.domain;
|
||||
effectiveServerName =
|
||||
if cfg.serverName != null then
|
||||
cfg.serverName
|
||||
else if cfg.useSubdomain then
|
||||
"matrix.${hyperhiveDomain}"
|
||||
else
|
||||
hyperhiveDomain;
|
||||
if cfg.serverName != null then cfg.serverName else "matrix.${hyperhiveDomain}";
|
||||
in
|
||||
{
|
||||
# Private Matrix homeserver (matrix-tuwunel — the official conduwuit
|
||||
|
|
@ -64,29 +59,16 @@ in
|
|||
serverName = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
default = null;
|
||||
example = "matrix.darkest.space";
|
||||
example = "chat.example.org";
|
||||
description = ''
|
||||
Matrix `server_name` — the host part of every user ID
|
||||
(`@argus:<server_name>`) and room ID minted on this
|
||||
homeserver. CRITICAL: must be stable from day one because
|
||||
it's embedded irrevocably in the identifiers. Defaults to
|
||||
`matrix.''${hyperhive.domain}` when `useSubdomain = true`
|
||||
(the typical path — keeps the root domain free for the
|
||||
dashboard or forge), or to `''${hyperhive.domain}` itself
|
||||
when `useSubdomain = false`. Override here only if you need
|
||||
a name that doesn't follow either pattern.
|
||||
'';
|
||||
};
|
||||
|
||||
useSubdomain = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
When `serverName` is unset, use `matrix.''${hyperhive.domain}`
|
||||
rather than `''${hyperhive.domain}` itself. The default is
|
||||
true because the root domain is usually claimed by the
|
||||
dashboard or the forge; turn off only if the root domain is
|
||||
free AND you want matrix to serve from there.
|
||||
`matrix.''${hyperhive.domain}` (always a subdomain — keeps
|
||||
the root domain free for the dashboard or forge). Override
|
||||
here only if you need a name that doesn't follow the
|
||||
`matrix.<domain>` shape.
|
||||
'';
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue