Hey, I am using nixos-unstable, and I’ve noticed that switching to direnv directory with envrc became significantly slower since about a week ago. It went for less then a second to 10 seconds and a bit.
Here’s the setup I use
$ cat .envrc
use nix
$ cat shell.nix
with import <nixpkgs> {};
mkShell {
LIBCLANG_PATH = "${llvmPackages_13.libclang.lib}/lib";
}
Cursiously, nix --version is also excruciatingly slow for me (not sure if that’s a regression or a per-existing behavior):
$ t nix --version
nix (Nix) 2.3.16
real 10.02s
cpu 0.00s (0.00s user + 0.00s sys)
rss 17.38mb
Has anybody else seen this? What might be the issue?
We’re you using nix-direnv at some point? If so, perhaps it broken somehow and you are now missing it’s improved caching benefits over the default use nix function for direnv?
Bingo! I didn’t realize that 192.168.0.1 is a router, I thought that that’s localhost. Yeah, it seems that nix is generally unrelated, and that my router’s config got borked after a recent reboot . You saved so many n * 10 seconds of my life, thanks!
Though, I am still wondering why nix --version has to do a dns lookup…