machine-config/bert/services/http/home.chandlerswift.com.nix

30 lines
850 B
Nix
Raw Permalink Normal View History

2024-10-31 00:55:10 -05:00
{
services.caddy.virtualHosts."home.chandlerswift.com".extraConfig = ''
encode zstd gzip
file_server
2024-11-05 23:48:09 -06:00
root * /srv/www/home.chandlerswift.com
2024-10-31 01:50:48 -05:00
reverse_proxy /grafana/* localhost:3000
2024-10-31 00:55:10 -05:00
# hide .git # ???
file_server /sheets/* {
browse ${./caddy-browse-template.html}
# TOOD: is there a better way to strip the prefix here? This shouldn't be
# vulnerable to a directory traversal attack (and it doesn't really
# matter anyway; everything in there is public somewhere or another!) but
# it sorta feels wrong to do this without a `/sheets` suffix.
root /mnt/bigbird-public
}
handle_errors {
respond "{err.status_code} {err.status_text}"
}
2024-10-31 00:55:10 -05:00
'';
systemd.tmpfiles.settings."10-home-chandlerswift-com" = {
2024-11-05 23:48:09 -06:00
"/srv/www/home.chandlerswift.com" = {
2024-10-31 00:55:10 -05:00
d = {};
};
};
}