chore(cache.tvl.su): Raise cache priority to 50
The priority of binary caches is decided by the remotes in Nix (???), and by default nix-serve (which is *very* slow) has a lower priority than cache.nixos.org (which means that it will be preferred over the faster cache for paths that exist on both). To avoid this, override the hardcoded (????) priority by serving the nix-cache-info response directly from nginx instead. Change-Id: I15a2d6618386d16edaf69f1c9257a36bd72132d2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4823 Tested-by: BuildkiteCI Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: grfn <grfn@gws.fyi>
This commit is contained in:
parent
1bd6c2a85b
commit
b8e011f792
1 changed files with 5 additions and 0 deletions
|
@ -17,6 +17,11 @@
|
|||
alias /run/agenix/nix-cache-pub;
|
||||
}
|
||||
|
||||
location = /nix-cache-info {
|
||||
add_header Content-Type text/plain;
|
||||
return 200 "StoreDir: /nix/store\nWantMassQuery: 1\nPriority: 50\n";
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:${toString config.services.nix-serve.port};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue