summaryrefslogtreecommitdiff
path: root/chaski/services/conduit.nix
blob: 022863cb0cef203efc6abc6e35e0bdea3f5ce5c0 (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
29
30
31
32
33
34
35
36
{ config, lib, pkgs, ... }:

{
  services.matrix-conduit = {
    enable = true;

    extraEnvironment.RUST_BACKTRACE = "yes";
    settings.global = {
      server_name = "conduit.stuebinm.eu";
      trusted_servers = [  ]; # TODO what does this mean?
      port = 6167;
      allow_registration = false;
    };

  };

  services.nginx.virtualHosts."conduit.stuebinm.eu" = {
    locations."/_matrix/".proxyPass = "http://localhost:6167";
    enableACME = true;
    forceSSL = true;
    listen = [
      {
        addr = "[::]";
        port = 443;
        ssl = true;
      }
      {
        addr = "[::]";
        port = 8448;
        ssl = true;
      }
    ];
  };

  networking.firewall.allowedTCPPorts = [ 8448 ];
}