summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--machines/renard/default.nix24
1 files changed, 23 insertions, 1 deletions
diff --git a/machines/renard/default.nix b/machines/renard/default.nix
index 0fbd01d..faf0042 100644
--- a/machines/renard/default.nix
+++ b/machines/renard/default.nix
@@ -10,7 +10,29 @@
../../modules/www.nix
];
- services.nginx = {
+ services.nginx.virtualHosts = {
+ "rnrd.eu".locations = {
+ # redirect to akkoma on lapin
+ "/.well-known/webfinger" = {
+ return = "301 https://soc.rnrd.eu$request_uri";
+ };
+
+ # delegate matrix to lapin
+ "/.well-known/matrix/server" = {
+ return = "200 '{ \"m.server\": \"matrix.rnrd.eu:443\" }'";
+ extraConfig = ''
+ default_type application/json;
+ '';
+ };
+ "/.well-known/matrix/client" = {
+ return = "200 '{ \"m.homeserver\": { \"base_url\": \"https://matrix.rnrd.eu\" } }'";
+ extraConfig = ''
+ default_type application/json;
+ add_header "Access-Control-Allow-Origin" *;
+ '';
+ };
+ };
+
"sho.rest" = {
enableACME = true;
forceSSL = true;