summary refs log tree commit diff
path: root/host
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-02-21 22:30:17 +0100
committerRory& <root@rory.gay>2026-02-21 22:30:24 +0100
commitfdbada601862d7d91ac2a523ee7b6a8bf03447da (patch)
tree26355d7a4848cd6a6387533c680f292ebe981eed /host
parentServer changes (diff)
downloadRory-Open-Architecture-fdbada601862d7d91ac2a523ee7b6a8bf03447da.tar.xz
prosody?
Diffstat (limited to 'host')
-rwxr-xr-xhost/Rory-ovh/services/nginx/rory.gay/root.nix26
-rw-r--r--host/Rory-ovh/services/prosody.nix13
2 files changed, 38 insertions, 1 deletions
diff --git a/host/Rory-ovh/services/nginx/rory.gay/root.nix b/host/Rory-ovh/services/nginx/rory.gay/root.nix

index 2f491cf..895ae77 100755 --- a/host/Rory-ovh/services/nginx/rory.gay/root.nix +++ b/host/Rory-ovh/services/nginx/rory.gay/root.nix
@@ -3,7 +3,7 @@ enableACME = !config.virtualisation.isVmVariant; addSSL = !config.virtualisation.isVmVariant; root = "/data/nginx/html_rory_gay"; - extraConfig = ''autoindex on;''; + extraConfig = "autoindex on;"; locations."= /.well-known/matrix/server".extraConfig = '' more_set_headers 'Content-Type application/json'; @@ -46,4 +46,28 @@ } }'; ''; + + locations."= /.well-known/host-meta".extraConfig = '' + more_set_headers 'Content-Type application/json'; + more_set_headers 'Access-Control-Allow-Origin *'; + return 200 '<?xml version='1.0' encoding='utf-8'?> + <XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'> + <Link rel="urn:xmpp:alt-connections:websocket" + href="wss://xmpp.rory.gay/ws" /> + </XRD>'; + ''; + locations."= /.well-known/host-meta.json".extraConfig = '' + more_set_headers 'Content-Type application/json'; + more_set_headers 'Access-Control-Allow-Origin *'; + return 200 '${ + builtins.toJSON { + links = [ + { + rel = "urn:xmpp:alt-connections:websocket"; + href = "wss://xmpp.rory.gay/ws"; + } + ]; + } + }'; + ''; } diff --git a/host/Rory-ovh/services/prosody.nix b/host/Rory-ovh/services/prosody.nix new file mode 100644
index 0000000..53743a4 --- /dev/null +++ b/host/Rory-ovh/services/prosody.nix
@@ -0,0 +1,13 @@ +{ lib, pkgs, ... }: +{ + services.prosody = { + enable = true; + virtualhosts."rory.gay" = { + enabled = true; + domain = "rory.gay"; + }; + admins = [ + "emma@rory.gay" + ]; + }; +}