1{
2 self,
3 ...
4}:
5let
6 d = self.lib.data.services.matrix-server;
7in
8{
9 services.matrix-conduit = {
10 enable = true;
11
12 settings.global = {
13 inherit (d) port;
14 server_name = "pyrox.dev";
15 max_request_size = 1024 * 1024 * 50;
16 allow_registration = false;
17 allow_federation = true;
18 allow_check_for_updates = false;
19 trusted_servers = [
20 "matrix.org"
21 "vector.im"
22 "catgirl.cloud"
23 "nixos.org"
24 ];
25 address = "0.0.0.0";
26 well_known = {
27 client = "https://${d.extUrl}";
28 server = "${d.extUrl}:443";
29 };
30 media = {
31 backend = "filesystem";
32 directory_structure = {
33 depth = 2;
34 length = 3;
35 };
36 retention = [
37 {
38 space = "100G";
39 }
40 {
41 scope = "remote";
42 accessed = "30d";
43 created = "90d";
44 }
45 {
46 scope = "thumbnail";
47 space = "1G";
48 }
49 ];
50 };
51 };
52 };
53}