tangled
alpha
login
or
join now
tjh.dev
/
nixpkgs
Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
0
fork
atom
overview
issues
pulls
pipelines
nixos/matrix-dendrite: rename to dendrite
Robert Schütz
4 years ago
f82c6fdf
007cab96
+14
-14
2 changed files
expand all
collapse all
unified
split
nixos
modules
module-list.nix
services
misc
dendrite.nix
+1
-1
nixos/modules/module-list.nix
···
472
472
./services/misc/cgminer.nix
473
473
./services/misc/confd.nix
474
474
./services/misc/couchpotato.nix
475
475
+
./services/misc/dendrite.nix
475
476
./services/misc/devmon.nix
476
477
./services/misc/dictd.nix
477
478
./services/misc/duckling.nix
···
514
515
./services/misc/mame.nix
515
516
./services/misc/matrix-appservice-discord.nix
516
517
./services/misc/matrix-appservice-irc.nix
517
517
-
./services/misc/matrix-dendrite.nix
518
518
./services/misc/matrix-synapse.nix
519
519
./services/misc/mautrix-telegram.nix
520
520
./services/misc/mbpfan.nix
+13
-13
nixos/modules/services/misc/matrix-dendrite.nix
nixos/modules/services/misc/dendrite.nix
···
1
1
{ config, lib, pkgs, ... }:
2
2
let
3
3
-
cfg = config.services.matrix-dendrite;
3
3
+
cfg = config.services.dendrite;
4
4
settingsFormat = pkgs.formats.yaml { };
5
5
configurationYaml = settingsFormat.generate "dendrite.yaml" cfg.settings;
6
6
-
workingDir = "/var/lib/matrix-dendrite";
6
6
+
workingDir = "/var/lib/dendrite";
7
7
in
8
8
{
9
9
-
options.services.matrix-dendrite = {
9
9
+
options.services.dendrite = {
10
10
enable = lib.mkEnableOption "matrix.org dendrite";
11
11
httpPort = lib.mkOption {
12
12
type = lib.types.nullOr lib.types.port;
···
24
24
};
25
25
tlsCert = lib.mkOption {
26
26
type = lib.types.nullOr lib.types.path;
27
27
-
example = "/var/lib/matrix-dendrite/server.cert";
27
27
+
example = "/var/lib/dendrite/server.cert";
28
28
default = null;
29
29
description = ''
30
30
The path to the TLS certificate.
···
36
36
};
37
37
tlsKey = lib.mkOption {
38
38
type = lib.types.nullOr lib.types.path;
39
39
-
example = "/var/lib/matrix-dendrite/server.key";
39
39
+
example = "/var/lib/dendrite/server.key";
40
40
default = null;
41
41
description = ''
42
42
The path to the TLS key.
···
48
48
};
49
49
environmentFile = lib.mkOption {
50
50
type = lib.types.nullOr lib.types.path;
51
51
-
example = "/var/lib/matrix-dendrite/registration_secret";
51
51
+
example = "/var/lib/dendrite/registration_secret";
52
52
default = null;
53
53
description = ''
54
54
Environment file as defined in <citerefentry>
···
62
62
63
63
<programlisting>
64
64
# snippet of dendrite-related config
65
65
-
services.matrix-dendrite.settings.client_api.registration_shared_secret = "$REGISTRATION_SHARED_SECRET";
65
65
+
services.dendrite.settings.client_api.registration_shared_secret = "$REGISTRATION_SHARED_SECRET";
66
66
</programlisting>
67
67
68
68
<programlisting>
···
140
140
'';
141
141
}];
142
142
143
143
-
systemd.services.matrix-dendrite = {
143
143
+
systemd.services.dendrite = {
144
144
description = "Dendrite Matrix homeserver";
145
145
after = [
146
146
"network.target"
···
149
149
serviceConfig = {
150
150
Type = "simple";
151
151
DynamicUser = true;
152
152
-
StateDirectory = "matrix-dendrite";
152
152
+
StateDirectory = "dendrite";
153
153
WorkingDirectory = workingDir;
154
154
-
RuntimeDirectory = "matrix-dendrite";
154
154
+
RuntimeDirectory = "dendrite";
155
155
RuntimeDirectoryMode = "0700";
156
156
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
157
157
ExecStartPre =
158
158
if (cfg.environmentFile != null) then ''
159
159
${pkgs.envsubst}/bin/envsubst \
160
160
-i ${configurationYaml} \
161
161
-
-o /run/matrix-dendrite/dendrite.yaml
161
161
+
-o /run/dendrite/dendrite.yaml
162
162
'' else ''
163
163
-
${pkgs.coreutils}/bin/cp ${configurationYaml} /run/matrix-dendrite/dendrite.yaml
163
163
+
${pkgs.coreutils}/bin/cp ${configurationYaml} /run/dendrite/dendrite.yaml
164
164
'';
165
165
ExecStart = lib.strings.concatStringsSep " " ([
166
166
"${pkgs.dendrite}/bin/dendrite-monolith-server"
167
167
-
"--config /run/matrix-dendrite/dendrite.yaml"
167
167
+
"--config /run/dendrite/dendrite.yaml"
168
168
] ++ lib.optionals (cfg.httpPort != null) [
169
169
"--http-bind-address :${builtins.toString cfg.httpPort}"
170
170
] ++ lib.optionals (cfg.httpsPort != null) [