summary refs log tree commit diff
path: root/hosts/vps/matrix.nix
blob: cb1332617c76ac00b6ff9b44ea8ee938ce38ccbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ 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];
  };
}