diff options
| author | Mel <einebeere@gmail.com> | 2024-11-04 17:08:07 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-11-04 17:08:07 +0100 |
| commit | c08dd04ad9775a458aec463e8402797c2f523860 (patch) | |
| tree | 04c643d1adaea602f2a5cd179779808aa0d5bd88 /machines/renard/default.nix | |
| parent | 29abea4f6604a10b922bd2ba97aa3b037066a837 (diff) | |
| download | network-c08dd04ad9775a458aec463e8402797c2f523860.tar.zst network-c08dd04ad9775a458aec463e8402797c2f523860.zip | |
Add delegation for some services from renard to lapin
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'machines/renard/default.nix')
| -rw-r--r-- | machines/renard/default.nix | 24 |
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; |
