1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-08-03 13:37:45 +00:00

Compare commits

..

No commits in common. "7302727cfc9051b71140e87be5af2795de7aaab4" and "9904b03908af207e6f7d028622a4c3583ce65176" have entirely different histories.

View file

@ -7,26 +7,11 @@ in {
imports = [(self + /modules/nginx.nix)];
services.nginx = enabled {
appendHttpConfig = /* nginx */ ''
# Cache only successful responses.
map $status $cache_header {
200 "public";
302 "public";
default "no-cache";
}
'';
virtualHosts.${domain} = merge config.services.nginx.sslTemplate {
inherit root;
locations."/".tryFiles = "$uri $uri.html $uri/index.html =404";
locations."~ ^/assets/(fonts|icons|images)/".extraConfig = /* nginx */ ''
expires max;
${config.services.nginx.headers}
add_header Cache-Control $cache_header always;
'';
extraConfig = /* nginx */ ''
error_page 404 /404.html;
'';