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
Describe the bug
Expected behavior: the locked index should be cached as long as the GC root is pinned.
Observed: [155.8 MiB DL] downloading 'https://github.com/NixOS/nixpkgs/archive/ae5c332cbb5827f6b1f02572496b141021de335f.zip' after an hour.
I think this is an upstream issue, maybe the one discussed in https://discourse.nixos.org/t/pinned-nixpkgs-keeps-getting-garbage-collected/12912, but as honestly this is a huge usability papercut for devenv (I'd like to use it broadly, but these frequent refetches are too much) it seems wise to track here to move towards a solution. LMK if this is a dupe or something peculiar to my nix config. My devenv.yaml looks like:
inputs:
nixpkgs:
# use nixpkgs from system registry.
url: nixpkgs
The text was updated successfully, but these errors were encountered:
This issue is with nix itself, and isn't devenv-specific. Absent a link to a proper writeup, for anyone else struggling with frequent nixpkgs index refreshes, here's what to do:
Assuming you're using a flake to build the output that configures nix itself (either nixos, home-manager).
Use a direct path (skip the registry) for the nixpkgs input to that flake, like nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
Set nix.registry.nixpkgs.flake = inputs.nixpkgs; in your system config module (nixos, hm, darwin, nix-on-droid, etc). This says "use the locked version in the current flake at build time as the system registry nixpkgs". It results in a registry entry (nix registry list) that points at a store path, which ensures no network traffic.
There is a helper nix.generateRegistryFromInputs in the flake-utils-plus module that will do this for all your system flake inputs, which is handy but I haven't implemented it yet.
Describe the bug
Expected behavior: the locked index should be cached as long as the GC root is pinned.
Observed:
[155.8 MiB DL] downloading 'https://github.com/NixOS/nixpkgs/archive/ae5c332cbb5827f6b1f02572496b141021de335f.zip'
after an hour.I think this is an upstream issue, maybe the one discussed in https://discourse.nixos.org/t/pinned-nixpkgs-keeps-getting-garbage-collected/12912, but as honestly this is a huge usability papercut for devenv (I'd like to use it broadly, but these frequent refetches are too much) it seems wise to track here to move towards a solution. LMK if this is a dupe or something peculiar to my nix config. My devenv.yaml looks like:
The text was updated successfully, but these errors were encountered: