convert caddy to nixos builtin

This commit is contained in:
nora 2025-08-04 21:18:59 +02:00
parent 71b4ca1448
commit 33a7017375
18 changed files with 326 additions and 263 deletions

View file

@ -18,4 +18,15 @@ let upload-files = import (fetchTarball "https://github.com/Noratrieb/upload.fil
EnvironmentFile = [ config.age.secrets.upload_files_s3_secret.path ];
};
};
services.caddy.virtualHosts."upload.files.noratrieb.dev" = {
logFormat = "";
extraConfig = ''
encode zstd gzip
# we need HTTP/2 here because the server doesn't work with HTTP/1.1
# because it will send early 401 responses during the upload without consuming the body
# (this has been mostly fixed but still keep it)
reverse_proxy * h2c://localhost:3050
'';
};
}