numtide / nar-serve

Unpack and serve NAR file content on the fly
Apache License 2.0
30 stars 8 forks source link

Use the .ls files to improve performance #1

Open zimbatm opened 5 years ago

zimbatm commented 5 years ago

Nix clients who upload with write-nar-listing = true also upload a .ls file that contains all the archive metadata.

nix run nixpkgs.{brotli,curl, bash} -c \
curl -v https://cache.nixos.org/$(readlink $(which bash) | cut -d/ -f4 | cut -d- -f1).ls | brotli -d

This could be used to quickly determine whenever a file exists and also create directory listings.