From 7af36d0e25575a72ca33b48d8d20583d8e6cbb4f Mon Sep 17 00:00:00 2001 From: Ahwx Date: Wed, 17 Jul 2024 03:20:00 +0200 Subject: [PATCH] feat: adds liv.town to nginx --- modules/services/matrix/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/services/matrix/default.nix b/modules/services/matrix/default.nix index 2f86f67..e7d554c 100644 --- a/modules/services/matrix/default.nix +++ b/modules/services/matrix/default.nix @@ -10,6 +10,11 @@ let return 200 '${builtins.toJSON data}'; ''; in { + + imports = [ + ../liv-town.nix # If using Matrix, also require website, TODO: should probably be the other way around. + ]; + security.acme = { acceptTerms = true; defaults.email = "ahwx@ahwx.org"; @@ -81,9 +86,7 @@ in { # It's also possible to do a redirect here or something else, this vhost is not # needed for Matrix. It's recommended though to *not put* element # here, see also the section about Element. - locations."/".extraConfig = '' - return 404; - ''; + locations."/".proxyPass = "http://[::1]:4321"; # Forward all Matrix API calls to the synapse Matrix homeserver. A trailing slash # *must not* be used here. locations."/_matrix".proxyPass = "http://[::1]:8008";