26 lines
771 B
Nix
26 lines
771 B
Nix
|
|
{
|
|
services.caddy.virtualHosts."home.chandlerswift.com".extraConfig = ''
|
|
encode zstd gzip
|
|
file_server
|
|
root * /srv/www/home.chandlerswift.com
|
|
reverse_proxy /grafana/* localhost:3000
|
|
# 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
|
|
}
|
|
'';
|
|
systemd.tmpfiles.settings."10-home-chandlerswift-com" = {
|
|
"/srv/www/home.chandlerswift.com" = {
|
|
d = {};
|
|
};
|
|
};
|
|
}
|