You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would be especially useful when running multiple binary caches. I personally run 3 binary caches, one on my vserver, one at home and one at the local hackerspace. It would be nice to have nixos automatically chose the caches in the local network, which setting the priority would facilitate.
The text was updated successfully, but these errors were encountered:
e1mo
added a commit
to e1mo/nix-serve
that referenced
this issue
Feb 20, 2023
Might be a bit late, but nix-serve-ng supports a flag for this,
I found myself running this,
services={# https://search.nixos.org/options?channel=unstable&type=packages&query=nix-servenix-serve={enable=true;# Use nix-serve-ng. https://github.com/aristanetworks/nix-serve-ngpackage=pkgs.nix-serve-ng;openFirewall=false;# Served through nginxextraParams=lib.concatStringsSep" "["--priority 40"# (Match priority of https://cache.nixos.org/nix-cache-info as my machines may be offline)];# Generate keys with,# sudo nix-store \# --generate-binary-cache-key \# "nix-store--$(hostname)" \# /var/keys/nix-store-private.pem \# /var/keys/nix-store-public.pemsecretKeyFile="/var/keys/nix-store-private.pem";};};
The priority of the binary cache info file is currently hardcoded to
30
https://github.com/edolstra/nix-serve/blob/master/nix-serve.psgi#L18, it would be nice to have an option to change this value, i.e. using a command-line parameter.This would be especially useful when running multiple binary caches. I personally run 3 binary caches, one on my vserver, one at home and one at the local hackerspace. It would be nice to have nixos automatically chose the caches in the local network, which setting the priority would facilitate.
The text was updated successfully, but these errors were encountered: