From 579a3ada7725f9906d2afb7b4493391576fd6641 Mon Sep 17 00:00:00 2001 From: cy Date: Wed, 5 Feb 2025 14:08:14 -0500 Subject: [PATCH] bring cything.io to chunk --- home/yt/ytnix.nix | 1 + hosts/chunk/conduwuit.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/home/yt/ytnix.nix b/home/yt/ytnix.nix index 2aa25ae..748ba3b 100644 --- a/home/yt/ytnix.nix +++ b/home/yt/ytnix.nix @@ -124,6 +124,7 @@ ida-free patchelf radare2 + p7zip ]; programs.waybar.enable = true; diff --git a/hosts/chunk/conduwuit.nix b/hosts/chunk/conduwuit.nix index 8aa8998..99d3958 100644 --- a/hosts/chunk/conduwuit.nix +++ b/hosts/chunk/conduwuit.nix @@ -15,4 +15,21 @@ import common reverse_proxy localhost:8448 ''; + + services.caddy.virtualHosts."cything.io" = { + serverAliases = [ "www.cything.io" ]; + extraConfig = '' + import common + + header /.well-known/matrix/* Content-Type application/json + header /.well-known/matrix/* Access-Control-Allow-Origin * + header /.well-known/matrix/* Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS,PATCH,HEAD + header /.well-known/matrix/* Access-Control-Allow-Headers X-Requested-With,Content-Type,Authorization,Origin,Accept + route { + respond /.well-known/matrix/server {"m.server":"chat.cything.io:443"} + respond /.well-known/matrix/client {"m.server":{"base_url":"https://chat.cything.io"},"m.homeserver":{"base_url":"https://chat.cything.io"},"org.matrix.msc3575.proxy":{"url":"https://chat.cything.io"}} + redir https://cy7.sh/posts{uri} permanent + } + ''; + }; }