From fdbada601862d7d91ac2a523ee7b6a8bf03447da Mon Sep 17 00:00:00 2001 From: Rory& Date: Sat, 21 Feb 2026 22:30:17 +0100 Subject: prosody? --- host/Rory-ovh/services/nginx/rory.gay/root.nix | 26 +++++++++++++++++++++++++- host/Rory-ovh/services/prosody.nix | 13 +++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 host/Rory-ovh/services/prosody.nix (limited to 'host') 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 ' + + + '; + ''; + 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" + ]; + }; +} -- cgit 1.5.1