From 6820f4dbe1282757f929c272a5aa3b5e9ad4cd30 Mon Sep 17 00:00:00 2001 From: twoneis Date: Wed, 19 Feb 2025 20:44:06 +0100 Subject: [PATCH] matrix works --- modules/matrix/default.nix | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/modules/matrix/default.nix b/modules/matrix/default.nix index cef43d2..888d5d0 100644 --- a/modules/matrix/default.nix +++ b/modules/matrix/default.nix @@ -3,14 +3,34 @@ inherit (lib) mkIf; in mkIf conf.matrix.enable { services.nginx.virtualHosts = { + "twoneis.site" = { + serverName = "twoneis.site"; + useACMEHost = "twoneis.site"; + forceSSL = true; + locations = { + "/.well-known/matrix/server" = { + return = "200 '{\"m.server\": \"matrix.twoneis.site:443\"}'"; + }; + }; + }; "matrix.twoneis.site" = { + listen = [ + { + addr = "95.111.239.134"; + port = 443; + ssl = true; + } { + addr = "95.111.239.134"; + port = 8448; + ssl = true; + } + ]; serverName = "matrix.twoneis.site"; forceSSL = true; useACMEHost = "twoneis.site"; locations = { "/" = { - recommendedProxySettings = true; - proxyPass = "http://127.0.0.1:6167"; + proxyPass = "http://localhost:6167"; }; }; };