machine-config/bert/services/http/swiftgang.net.nix

21 lines
513 B
Nix
Raw Normal View History

2024-11-05 23:32:46 -06:00
{
# GoDaddy can't do flattening to apply a CNAME to an apex record. So we use
# their "forwarding" (redirect-as-a-service) to redirect to www.…, which we
# _can_ CNAME.
services.caddy.virtualHosts."www.swiftgang.net".extraConfig = ''
2024-11-05 23:32:46 -06:00
encode zstd gzip
file_server
2024-11-05 23:48:09 -06:00
root * /srv/www/swiftgang.net
handle_errors {
respond "{err.status_code} {err.status_text}"
}
2024-11-05 23:32:46 -06:00
'';
systemd.tmpfiles.settings."10-swiftgang-net" = {
2024-11-05 23:48:09 -06:00
"/srv/www/swiftgang.net" = {
2024-11-05 23:32:46 -06:00
d = {};
};
};
}