From dcce0940814309229d59d1cf7ccf51f79d5140dd Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sat, 20 Jul 2024 23:16:03 +0530 Subject: [PATCH] wynne: add well-knowns for matrix --- hosts/wynne/services/apps/acomputer.lol.nix | 35 +++++++++++++++++++++ hosts/wynne/services/apps/default.nix | 1 + 2 files changed, 36 insertions(+) create mode 100644 hosts/wynne/services/apps/acomputer.lol.nix diff --git a/hosts/wynne/services/apps/acomputer.lol.nix b/hosts/wynne/services/apps/acomputer.lol.nix new file mode 100644 index 0000000..f390237 --- /dev/null +++ b/hosts/wynne/services/apps/acomputer.lol.nix @@ -0,0 +1,35 @@ +_: { + services = { + caddy.virtualHosts."acomputer.lol" = { + extraConfig = '' + handle /.well-known/matrix/server { + header Content-Type application/json + header Access-Control-Allow-Origin * + respond `{"m.server": "matrix.acomputer.lol:443"}` + } + + handle /.well-known/matrix/client { + header Content-Type application/json + header Access-Control-Allow-Origin * + respond `{"m.homeserver": {"base_url": "https://matrix.acomputer.lol:443"}}` + } + ''; + }; + frp.settings.proxies = [ + { + name = "http.acomputer.lol"; + type = "http"; + customDomains = [ "acomputer.lol" ]; + localPort = 80; + transport.useCompression = true; + } + { + name = "https.acomputer.lol"; + type = "https"; + customDomains = [ "acomputer.lol" ]; + localPort = 443; + transport.useCompression = true; + } + ]; + }; +} diff --git a/hosts/wynne/services/apps/default.nix b/hosts/wynne/services/apps/default.nix index 218548e..0059a19 100644 --- a/hosts/wynne/services/apps/default.nix +++ b/hosts/wynne/services/apps/default.nix @@ -1,5 +1,6 @@ _: { imports = [ + ./acomputer.lol.nix ./postgresql.nix ../../../shared/prometheus-exporters.nix ];