Files
nixos-config/hosts/cepheus/caddy.nix

18 lines
647 B
Nix
Raw Permalink Normal View History

2025-08-20 18:24:02 +03:00
{ inputs, ... }: {
services.caddy = {
enable = true;
virtualHosts."nothing.run, www.nothing.run".extraConfig = ''
header /.well-known/matrix/* Content-Type application/json
header /.well-known/matrix/* Access-Control-Allow-Origin *
respond /.well-known/matrix/server `{"m.server": "matrix.nothing.run:443"}`
respond /.well-known/matrix/client `{"m.homeserver":{"base_url":"https://matrix.nothing.run"},"org.matrix.msc3575.proxy":{"url":"https://matrix.nothing.run"}}`
root * ${inputs.website.website}
file_server
'';
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
}