machine-config/bert/services/http/home.chandlerswift.com.nix
Chandler Swift b933ecc24e
bert: Fix bigbird_public mount path
The mount path had changed months back:

    commit ccc8708a6b
    Author: Chandler Swift <chandler@chandlerswift.com>
    Date:   Tue Jan 14 23:31:14 2025 -0600

        bert: Rename mount so systemd doesn't escape hyphen

    diff --git a/bert/configuration.nix b/bert/configuration.nix
    index 61f79b1..4072b87 100644
    --- a/bert/configuration.nix
    +++ b/bert/configuration.nix
    @@ -40 +40 @@
    -  fileSystems."/mnt/bigbird-public" = {
    +  fileSystems."/mnt/bigbird_public" = {

but I missed this use, so `/sheets` was 404ing.
2025-07-04 14:27:53 -05:00

29 lines
850 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
}
handle_errors {
respond "{err.status_code} {err.status_text}"
}
'';
systemd.tmpfiles.settings."10-home-chandlerswift-com" = {
"/srv/www/home.chandlerswift.com" = {
d = {};
};
};
}