[Nix-dev] cache.nixos.org. mirror

Eelco Dolstra eelco.dolstra at logicblox.com
Mon Oct 24 11:55:45 CEST 2016


On 10/24/2016 01:05 AM, Nikolay Amiantov wrote:

> Apparently, recently cache.nixos.org was blocked in Russia[1] (not it
> specifically, but rather a bunch of CloudFront hosts, because something
> illegal was using it). I don't yet experience the block myself at home
> (seems my ISP is reluctant to actually abide by the law). However, I
> can't access the cache from a server which is located in a data center.
> Is there any mirror that is not provided via CloudFront? Perhaps we can
> workaround this by using some known-good IP addresses hardcoded to
> /etc/hosts. Maybe there are known non-blocked CloudFront hosts that
> other Russia-located people can share?

You could try the underlying S3 bucket (https://nix-cache.s3.amazonaws.com/),
but that should generally be avoided because it's a bit more expensive than
CloudFront (and of course slower).

BTW, currently the cache.nixos.org CloudFront distribution only uses US,
Canadian and EU edge locations for cost reasons (e.g. the South American edge
locations are 3 times as expensive). However, since CloudFront doesn't have any
Russian edge locations, this probably doesn't matter.

If somebody wants to set up a mirror, I'm happy to help with that. With Nix
master, it's pretty easy to mirror (parts of) cache.nixos.org. For example, to
mirror the current 16.09-small release:

  $ nix copy -r --store https://cache.nixos.org/ --to file:///tmp/my-mirror \
     $(curl -L https://nixos.org/channels/nixos-16.09-small/store-paths.xz | xz -d)

Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/

More information about the nix-dev mailing list