Use harmonia instead of attic for binary cache
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 2h1m7s
All checks were successful
CI / Check, build and cache Nix flake (push) Successful in 2h1m7s
This commit is contained in:
@@ -239,6 +239,8 @@ in
|
||||
];
|
||||
|
||||
recommendedTlsSettings = true;
|
||||
recommendedBrotliSettings = true;
|
||||
recommendedZstdSettings = true;
|
||||
clientMaxBodySize = "0";
|
||||
serverTokens = true;
|
||||
resolver = {
|
||||
|
@@ -407,10 +407,13 @@ in
|
||||
ignore_invalid_headers off;
|
||||
'';
|
||||
|
||||
nixCacheableRegex = ''^\/(\S+\.narinfo|nar\/\S+\.nar\.\S+)$'';
|
||||
nixCacheableRegex = ''^\/(\S+\.narinfo|nar\/\S+\.nar.*|serve\/.+)$'';
|
||||
nixCacheHeaders = ''
|
||||
add_header Cache-Control $nix_cache_control;
|
||||
add_header Expires $nix_expires;
|
||||
|
||||
brotli on;
|
||||
brotli_types application/x-nix-archive;
|
||||
'';
|
||||
in
|
||||
{
|
||||
@@ -452,9 +455,11 @@ in
|
||||
|
||||
"nix-cache.${pubDomain}" = {
|
||||
locations = {
|
||||
"/".proxyPass = "http://${host}:8069";
|
||||
"/" = {
|
||||
proxyPass = "http://${host}:5000";
|
||||
};
|
||||
"~ ${nixCacheableRegex}" = {
|
||||
proxyPass = "http://${host}:8069";
|
||||
proxyPass = "http://${host}:5000";
|
||||
extraConfig = nixCacheHeaders;
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user