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;
|
cfg = config.hyperhive.matrix;
|
||||||
hyperhiveDomain = config.hyperhive.domain;
|
hyperhiveDomain = config.hyperhive.domain;
|
||||||
effectiveServerName =
|
effectiveServerName =
|
||||||
if cfg.serverName != null then
|
if cfg.serverName != null then cfg.serverName else "matrix.${hyperhiveDomain}";
|
||||||
cfg.serverName
|
|
||||||
else if cfg.useSubdomain then
|
|
||||||
"matrix.${hyperhiveDomain}"
|
|
||||||
else
|
|
||||||
hyperhiveDomain;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Private Matrix homeserver (matrix-tuwunel — the official conduwuit
|
# Private Matrix homeserver (matrix-tuwunel — the official conduwuit
|
||||||
|
|
@ -64,29 +59,16 @@ in
|
||||||
serverName = lib.mkOption {
|
serverName = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.str;
|
type = lib.types.nullOr lib.types.str;
|
||||||
default = null;
|
default = null;
|
||||||
example = "matrix.darkest.space";
|
example = "chat.example.org";
|
||||||
description = ''
|
description = ''
|
||||||
Matrix `server_name` — the host part of every user ID
|
Matrix `server_name` — the host part of every user ID
|
||||||
(`@argus:<server_name>`) and room ID minted on this
|
(`@argus:<server_name>`) and room ID minted on this
|
||||||
homeserver. CRITICAL: must be stable from day one because
|
homeserver. CRITICAL: must be stable from day one because
|
||||||
it's embedded irrevocably in the identifiers. Defaults to
|
it's embedded irrevocably in the identifiers. Defaults to
|
||||||
`matrix.''${hyperhive.domain}` when `useSubdomain = true`
|
`matrix.''${hyperhive.domain}` (always a subdomain — keeps
|
||||||
(the typical path — keeps the root domain free for the
|
the root domain free for the dashboard or forge). Override
|
||||||
dashboard or forge), or to `''${hyperhive.domain}` itself
|
here only if you need a name that doesn't follow the
|
||||||
when `useSubdomain = false`. Override here only if you need
|
`matrix.<domain>` shape.
|
||||||
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.
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue