jupiter: add nix cache local proxy
This commit is contained in:
@@ -9,12 +9,10 @@
|
|||||||
"steamdeck.cachix.org-1:BVoP4TEu3ECgotaO+3J3r9SSn62GkUDBwizOFU/q4Bc="
|
"steamdeck.cachix.org-1:BVoP4TEu3ECgotaO+3J3r9SSn62GkUDBwizOFU/q4Bc="
|
||||||
];
|
];
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
"https://steamdeck.cachix.org"
|
"https://cache.home.opel-online.de"
|
||||||
|
"https://steamdeck.cachix.org"
|
||||||
"https://cache.ci.kabtop.de"
|
"https://cache.ci.kabtop.de"
|
||||||
];
|
];
|
||||||
#extra-trusted-substituters = [
|
|
||||||
# "https://cache.home.opel-online.de"
|
|
||||||
#];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,16 @@
|
|||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
recommendedOptimisation = 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 = {
|
virtualHosts = {
|
||||||
"home.opel-online.de" = {
|
"home.opel-online.de" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
@@ -18,6 +28,27 @@
|
|||||||
default = true;
|
default = true;
|
||||||
locations."/".return = "503";
|
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;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user