From 3687d7cd73dba1ee7fea929927cf43d0acf99288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 25 Aug 2023 16:14:12 +0300 Subject: [PATCH] matrix-synapse listen on 0.0.0.0 --- data.nix | 9 ++++----- hosts/vno1-oh2/configuration.nix | 1 + modules/services/matrix-synapse/default.nix | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/data.nix b/data.nix index 37edced..cd58907 100644 --- a/data.nix +++ b/data.nix @@ -15,12 +15,11 @@ rec { ports = { grafana = 3000; gitea = 3001; - prometheus = 9001; - exporters = { - node = 9002; - }; - kodi = 8080; soju = 6697; + matrix-synapse = 8008; + kodi = 8080; + prometheus = 9001; + exporters.node = 9002; }; people_pubkeys = { diff --git a/hosts/vno1-oh2/configuration.nix b/hosts/vno1-oh2/configuration.nix index c2f0c4b..12201c0 100644 --- a/hosts/vno1-oh2/configuration.nix +++ b/hosts/vno1-oh2/configuration.nix @@ -83,6 +83,7 @@ myData.ports.grafana myData.ports.prometheus myData.ports.soju + myData.ports.matrix-synapse ]; node_exporter.enable = true; diff --git a/modules/services/matrix-synapse/default.nix b/modules/services/matrix-synapse/default.nix index ff751d3..4140a84 100644 --- a/modules/services/matrix-synapse/default.nix +++ b/modules/services/matrix-synapse/default.nix @@ -2,6 +2,7 @@ config, lib, pkgs, + myData, ... }: { options.mj.services.matrix-synapse = with lib.types; { @@ -17,6 +18,25 @@ extraConfigFiles = ["/run/matrix-synapse/secrets.yaml"]; settings = { server_name = "jakstys.lt"; + listeners = [ + { + bind_addresses = ["0.0.0.0"]; + port = myData.ports.matrix-synapse; + type = "http"; + tls = false; + x_forwarded = true; + resources = [ + { + names = ["client"]; + compress = true; + } + { + names = ["federation"]; + compress = false; + } + ]; + } + ]; admin_contact = "motiejus@jakstys.lt"; enable_registration = false; report_stats = true;