bucur/modules/services/caddy.nix
randogoth cd4d53386c Add nostr-rs-relay service
Runs the relay on localhost:8880, proxied publicly via Caddy at
wss://relay.otherwhere.app. Allows event kinds 0, 3, 37515, 37518.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 16:37:48 +03:00

68 lines
1.2 KiB
Nix

{ pkgs, ... }:
{
services.caddy.enable = true;
services.caddy.configFile = pkgs.writeText "Caddyfile" ''
http:// {
root * /usr/share/caddy
file_server
}
privatpraxis-last-heidelberg.de, www.privatpraxis-last-heidelberg.de {
root * /var/www/privatpraxis-last-heidelberg.de/public
encode zstd gzip
file_server
}
raayoni-last.com, www.raayoni-last.com, flux.vision, www.flux.vision {
redir https://tobias.raayoni-last.com
}
tobias.raayoni-last.com {
root * /var/www/raayoni-last.com/tobias/public
encode zstd gzip
file_server
}
randogoth.com, www.randogoth.com {
root * /var/www/raayoni-last.com/tobias/public
encode zstd gzip
file_server
}
sublunar.space, www.sublunar.space {
root * /var/www/sublunar.space/public
encode zstd gzip
file_server
}
almanac.sublunar.space {
root * /var/www/sublunar.space/almanac/public
encode zstd gzip
@wasm {
path /js/*.wasm
}
header @wasm Content-Type application/wasm
file_server
}
scopesessions.org, www.scopesessions.org {
root * /var/www/scopesessions.org/public
encode zstd gzip
file_server
}
nmns.place, www.nmns.place {
root * /var/www/nmns.place/public
encode zstd gzip
file_server
}
relay.otherwhere.app {
reverse_proxy localhost:8880
}
import Caddyfile.d/*.caddyfile
'';
}