diff --git a/config/services/matrix-media-repo.nix b/config/services/matrix-media-repo.nix index a40543e6..9b68db74 100644 --- a/config/services/matrix-media-repo.nix +++ b/config/services/matrix-media-repo.nix @@ -108,6 +108,11 @@ in return 200 '{ "m.homeserver": { "base_url": "https://matrix.chir.rs" } }'; ''; }; + locations."/_synapse/metrics" = { + extraConfig = '' + return 404 'Not found'; + ''; + }; }; services.nginx.virtualHosts."chir.rs" = { locations."/.well-known/matrix/server" = { diff --git a/config/services/prometheus.nix b/config/services/prometheus.nix index fabde018..4e99596c 100644 --- a/config/services/prometheus.nix +++ b/config/services/prometheus.nix @@ -84,9 +84,10 @@ } { job_name = "synapse"; + metrics_path = "/_synapse/metrics"; static_configs = [{ targets = [ - "nas.int.chir.rs:9009" + "matrix.int.chir.rs:80" ]; }]; } diff --git a/config/services/synapse.nix b/config/services/synapse.nix index f0d12aea..1b4e5071 100644 --- a/config/services/synapse.nix +++ b/config/services/synapse.nix @@ -11,17 +11,10 @@ x_forwarded = true; bind_addresses = [ "::1" "127.0.0.1" ]; resources = [{ - names = [ "client" "federation" ]; + names = [ "client" "federation" "metrics" ]; compress = false; }]; - } - { - port = 9009; - type = "metrics"; - tls = false; - bind_addresses = [ "::" ]; - resources = [ ]; - }]; + }]; admin_contact = "mailto:lotte@chir.rs"; retention.enabled = true; database = { @@ -84,6 +77,8 @@ add_header Alt-Svc 'h3=":443"'; ''; synapse = { + forceSSL = false; + addSSL = true; listenAddresses = listenIPs; locations."/_matrix" = { proxyPass = "http://localhost:8008";