summaryrefslogtreecommitdiff
path: root/modules/nixos/matrix-continuwuity.nix
blob: 2b9a785790c02bc4c86cd4ff1730b5c171abfad0 (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
{config, ...}: {
  services = {
    matrix-continuwuity = {
      enable = true;
      settings = {
        global = {
          server_name = "${config.networking.domain}";
          address = ["127.0.0.1"];
          port = [6167];
          well_known = {
            server = "matrix.${config.networking.domain}";
            client = "https://matrix.${config.networking.domain}";
          };
        };
      };
    };

    nginx = {
      upstreams.matrix.servers."127.0.0.1:6167" = {};
      virtualHosts = {
        "matrix.${config.networking.domain}".locations."/".proxyPass = "http://matrix";
        "${config.networking.domain}".locations."/.well-known/matrix".proxyPass = "http://matrix";
      };
    };
  };
}