Add website to nimbus
This commit is contained in:
parent
f3bb93c783
commit
30cccb51bc
2 changed files with 23 additions and 0 deletions
|
|
@ -11,6 +11,7 @@
|
|||
./hardware-configuration.nix
|
||||
../../modules/nixos/tailscale.nix
|
||||
../../modules/nixos/matrix.nix
|
||||
../../modules/nixos/website.nix
|
||||
];
|
||||
|
||||
# Workaround for https://github.com/NixOS/nix/issues/8502
|
||||
|
|
|
|||
22
modules/nixos/website.nix
Normal file
22
modules/nixos/website.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
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"
|
||||
}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue