nixos-config/hosts/chunk/conduwuit.nix

34 lines
1.1 KiB
Nix
Raw Normal View History

2025-02-23 13:08:07 -05:00
{ ... }:
2024-12-22 14:12:25 -05:00
{
2024-12-21 02:59:10 -05:00
services.conduwuit = {
enable = true;
settings.global = {
port = [ 8448 ];
server_name = "cything.io";
allow_check_for_updates = true;
};
};
services.caddy.virtualHosts."chat.cything.io".extraConfig = ''
import common
reverse_proxy localhost:8448
'';
2025-02-05 14:08:14 -05:00
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
}
'';
};
2024-12-21 02:59:10 -05:00
}