jupiter: add nix cache local proxy

This commit is contained in:
2026-04-25 18:21:00 +02:00
parent 12ad8a7dfa
commit 3e9b0496fb
2 changed files with 33 additions and 4 deletions

View File

@@ -11,6 +11,16 @@
recommendedTlsSettings = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
appendHttpConfig = ''
proxy_cache_path /mnt/Pluto/nix-cache
levels=1:2
keys_zone=nix_cache:10m
max_size=100g
inactive=180d
use_temp_path=off;
'';
virtualHosts = {
"home.opel-online.de" = {
enableACME = true;
@@ -18,6 +28,27 @@
default = true;
locations."/".return = "503";
};
"cache.home.opel-online.de" = {
useACMEHost = "home.opel-online.de";
forceSSL = true;
locations."/" = {
proxyPass = "https://cache.ci.kabtop.de";
extraConfig = ''
proxy_cache nix_cache;
proxy_cache_valid 200 14d;
proxy_cache_valid 404 1m;
proxy_cache_use_stale error timeout updating;
proxy_cache_lock on;
proxy_cache_lock_timeout 1h;
add_header X-Cache-Status $upstream_cache_status;
proxy_buffering on;
proxy_buffer_size 128k;
proxy_buffers 8 1m;
proxy_max_temp_file_size 0;
'';
};
};
};
};