configuration.nix/hosts/rico0/services/apps/acomputer.lol.nix

26 lines
683 B
Nix
Raw Normal View History

2024-09-14 19:55:57 +05:30
_:
let
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
domainName = "acomputer.lol";
in
{
2024-07-20 23:16:03 +05:30
services = {
2024-09-14 19:55:57 +05:30
caddy.virtualHosts."${domainName}" = {
2024-10-27 23:09:50 +05:30
inherit logFormat;
2024-07-20 23:16:03 +05:30
extraConfig = ''
handle /.well-known/matrix/server {
header Content-Type application/json
header Access-Control-Allow-Origin *
2024-09-14 19:55:57 +05:30
respond `{"m.server": "matrix.${domainName}:443"}`
2024-07-20 23:16:03 +05:30
}
handle /.well-known/matrix/client {
header Content-Type application/json
header Access-Control-Allow-Origin *
respond `{"m.homeserver": {"base_url": "https://matrix.${domainName}:443"}}`
2024-07-20 23:16:03 +05:30
}
'';
};
};
}