summary refs log tree commit diff
path: root/hosts/vps/matrix.nix
blob: 2d606b08e4119d5e88eabeba4dd5c60fa2b31a14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
  pkgs,
  config,
  ...
}: {
  config = {
    services.matrix-synapse = {
      enable = true;
      settings.server_name = config.networking.domain;
      settings.listeners = [
        {
          port = 8008;
          bind_addresses = ["::1"];
          type = "http";
          tls = false;
          x_forwarded = true;
          resources = [
            {
              names = ["client" "federation"];
              compress = true;
            }
          ];
        }
      ];
    };
    networking.firewall.allowedTCPPorts = [80 443];
  };
}