33 lines
688 B
Nix
33 lines
688 B
Nix
{
|
|
systemd.tmpfiles.rules = [
|
|
"d /var/www/jankremer.de 755 jan users -"
|
|
];
|
|
|
|
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"
|
|
}
|
|
'';
|
|
|
|
"jankremer.eu".extraConfig = ''
|
|
redir https://jankremer.de{uri} permanent
|
|
'';
|
|
};
|
|
|
|
networking.firewall.allowedTCPPorts = [
|
|
80
|
|
443
|
|
];
|
|
}
|