CUDA builds instead of fetching from Flox cache

Hi,

I’ve been struggling all day with setting up a Python/JAX/CUDA development environment.
I’m using Nix flakes on WSL2 (Fedora), pinned to nixos-25.05.

To save hours (and precious electrons), I added the new Flox CUDA cache to my Nix config (/etc/nix/nix.conf) as documented here:

A quick nix show-config confirms that the cache is active.

Issue:
When I run nix develop .#cuda, Nix does fetch non-CUDA packages (Python, etc.), but it still rebuilds every CUDA-related package locally (cudatoolkit, cudnn, nccl, …).
Nothing is fetched from the Flox cache, which is surprising since cudaPackages.cudatoolkit or cudaPackages.cudnn are quite common and large, so (I assume) they should be cached.

I also tried using the older unofficial CUDA cache (cache.nixos-cuda.org), but the result is the same, everything gets built instead of fetched.

Questions:
Am I missing something in the configuration?
Is there a way to check whether a given derivation is actually available in a specific binary cache?

Any insight would help, compiling CUDA under WSL2 is quite slow…

The Flox cache only contains derivations from their nixpkgs fork, presumably the versions from nixos-25.05 are too old so they’re not cached.

You either want to use nixos-unstable as your input since that one is directly mirrored or just use their nixpkgs directly (the stable branch should work just fine)

2 Likes

Oh yes makes sense, everythings work now, many thanks! :slight_smile: