nix-config/modules/nixos/website.nix
2026-03-26 12:20:07 +01:00

22 lines
493 B
Nix

{
systemd.tmpfiles.rules = [
"d /var/www/jankremer.de 755 root root -"
];
services.caddy.virtualHosts."jankremer.de".extraConfig = ''
handle {
root * /var/www/jankremer.de
file_server
@static {
path *.css *.js *.woff2 *.woff *.ttf *.png *.jpg *.jpeg *.svg *.ico *.webp
}
header @static Cache-Control "public, max-age=31536000, immutable"
@html {
path *.html
}
header @html Cache-Control "no-cache"
}
'';
}