tangled
alpha
login
or
join now
ptr.pet
/
ark
2
fork
atom
nix machine / user configurations
2
fork
atom
overview
issues
pulls
pipelines
stuff
ptr.pet
3 years ago
3d89098b
de6da760
+40
1 changed file
expand all
collapse all
unified
split
hosts
wolumonde
modules
conduit.nix
+40
hosts/wolumonde/modules/conduit.nix
reviewed
···
1
1
+
{config, pkgs, ...}:
2
2
+
let
3
3
+
wellKnownFileClient =
4
4
+
pkgs.writeText "client" (
5
5
+
builtins.toJSON
6
6
+
{ "m.homeserver"."base_url" = "https://matrix.gaze.systems"; }
7
7
+
);
8
8
+
wellKnownFileServer =
9
9
+
pkgs.writeText "server"
10
10
+
(builtins.toJSON { "m.server" = "matrix.gaze.systems:443"; });
11
11
+
in
12
12
+
{
13
13
+
services.matrix-conduit = {
14
14
+
enable = true;
15
15
+
settings.global = {
16
16
+
server_name = "gaze.systems";
17
17
+
max_request_size = 1000 * 1000 * 20;
18
18
+
allow_registration = true;
19
19
+
allow_federation = true;
20
20
+
trusted_servers = ["matrix.org" "nixos.dev" "conduit.rs"];
21
21
+
address = "::1";
22
22
+
port = 6167;
23
23
+
};
24
24
+
};
25
25
+
26
26
+
services.nginx.virtualHosts."matrix.gaze.systems" = {
27
27
+
enableACME = true;
28
28
+
forceSSL = true;
29
29
+
locations."/".proxyPass =
30
30
+
"http://localhost:${toString config.services.matrix-conduit.settings.global.port}";
31
31
+
};
32
32
+
services.nginx.virtualHosts."gaze.systems" = {
33
33
+
locations."/.well-known/matrix/client".extraConfig = ''
34
34
+
alias ${wellKnownFileClient}
35
35
+
'';
36
36
+
locations."/.well-known/matrix/server".extraConfig = ''
37
37
+
alias ${wellKnownFileServer}
38
38
+
'';
39
39
+
};
40
40
+
}