1

I was trying to figure out nix-serve / nix binary caching.

At some point I added:

  nix = {
    binaryCaches = [
      "https://cache.nixos.org/"
      "http://127.0.0.1:8899"
    ];
    binaryCachePublicKeys = [
      "my-nix-cache:z3o8Kf/PTzehVpMsE2KoYyf5rkU/XCR0+AfEvtKSgo8="
    ];
    trustedUsers = [ "root" "chris" ];
  };

I then removed my entries for 127.0.0.1 + ran nixos-rebuild switch.

However each time I try use nix-env now, it tries to still use 127.0.0.1:8899 as a binary cache...

How can I remove it / disable it?

nix-env -i i3     
warning: name collision in input Nix expressions, skipping '/home/chris/.nix-defexpr/channels_root/nixos'
warning: name collision in input Nix expressions, skipping '/home/chris/.nix-defexpr/channels_root/unstable'
installing 'i3-4.16.1'
warning: unable to download 'http://127.0.0.1:8899/09v6jr8gr9g50fm71yamspisi01g9b2d.narinfo': Couldn't connect to server (7); retrying in 324 ms
warning: unable to download 'http://127.0.0.1:8899/fnak72l1m3bci5qfn5719h1jzw2wjsdz.narinfo': Couldn't connect to server (7); retrying in 303 ms
warning: unable to download 'http://127.0.0.1:8899/fnak72l1m3bci5qfn5719h1jzw2wjsdz.narinfo': Couldn't connect to server (7); retrying in 520 ms
warning: unable to download 'http://127.0.0.1:8899/09v6jr8gr9g50fm71yamspisi01g9b2d.narinfo': Couldn't connect to server (7); retrying in 621 ms
warning: unable to download 'http://127.0.0.1:8899/fnak72l1m3bci5qfn5719h1jzw2wjsdz.narinfo': Couldn't connect to server (7); retrying in 1346 ms
warning: unable to download 'http://127.0.0.1:8899/09v6jr8gr9g50fm71yamspisi01g9b2d.narinfo': Couldn't connect to server (7); retrying in 1046 ms
warning: unable to download 'http://127.0.0.1:8899/09v6jr8gr9g50fm71yamspisi01g9b2d.narinfo': Couldn't connect to server (7); retrying in 2506 ms
warning: unable to download 'http://127.0.0.1:8899/fnak72l1m3bci5qfn5719h1jzw2wjsdz.narinfo': Couldn't connect to server (7); retrying in 2528 ms
1
  • Perhaps there's something caching (no pun intended) the use of binary caching. I know this will sound like a Windows troubleshooting tip, but... have you tried rebooting? Commented Oct 26, 2019 at 16:35

1 Answer 1

2

Deleting ~/.config/nix/nix.conf resolved the issue for me (I have no idea how it got created though).

Probably I could have just deleted the entry for 127.0.0.1:8899 but I was lazy.

substituters = https://cache.nixos.org https://cache.nixos.org/ https://hydra.iohk.io http://127.0.0.1:8899 ...
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= ...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .