From ffb00cd62672c19e875820049b86eb362e6d0775 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?KJ=20=C3=98rbekk?= Date: Sun, 14 May 2017 09:40:30 -0400 Subject: Add matrix configuration. --- config/matrix.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 config/matrix.nix (limited to 'config') diff --git a/config/matrix.nix b/config/matrix.nix new file mode 100644 index 0000000..6a57e76 --- /dev/null +++ b/config/matrix.nix @@ -0,0 +1,37 @@ +{ config, lib, pkgs, ... }: +let + matrixPort = (import ../data/aliases.nix).services.matrix.port; + matrixFederationPort = (import ../data/aliases.nix).services.matrixFederation.port; +in +{ + networking.firewall.allowedTCPPorts = [ matrixPort matrixFederationPort ]; + + services.matrix-synapse = { + enable = true; + server_name = "orbekk.com"; + # registration_shared_secret = "disable_after_registration"; + listeners = [ + { + port = matrixPort; + bind_address = ""; + type = "http"; + tls = false; + x_forwarded = true; + resources = [ + { names = ["client" "webclient"]; compress = true; } + # { names = ["federation"]; compress = false; } + ]; + } + { + port = matrixFederationPort; + bind_address = ""; + type = "http"; + tls = true; + x_forwarded = false; + resources = [ + { names = ["federation"]; compress = false; } + ]; + } + ]; + }; +} -- cgit v1.2.3