# CUDA builds instead of fetching from Flox cache

**URL:** https://discourse.nixos.org/t/cuda-builds-instead-of-fetching-from-flox-cache/72876
**Category:** Help
**Created:** [December 3, 2025, 4:40pm UTC](https://discourse.nixos.org/t/cuda-builds-instead-of-fetching-from-flox-cache/72876 "2025-12-03T16:40:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![user.compactor](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/u/bc8723/32.png) [@user.compactor](https://discourse.nixos.org/u/user.compactor)
#### Post date: [December 3, 2025, 4:40pm UTC](https://discourse.nixos.org/t/cuda-builds-instead-of-fetching-from-flox-cache/72876/1 "2025-12-03T16:40:48Z")

</div>

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:

> [@Nix, Flox, Nvidia Opening Up CUDA Redistribution on Nix](https://discourse.nixos.org/t/nix-flox-nvidia-opening-up-cuda-redistribution-on-nix/69189):
>
> Just landed back from NixCon, somehow every year is even more beautiful. I know that many of us in the Nix community dreamed of a world where Nix’s virtues of reproducibility, determinism, and portability would extend to CUDA projects. We knew this was possible. We also knew it would require alignment and approval with NVIDIA. The team at Flox has been working with NVIDIA over the past months on an agreement to redistribute CUDA Toolkit packages, in partnership with the NixOS Foundation, Nix …

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…

---

<div class="post-metadata">

### Author: ![user.compactor](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/u/bc8723/32.png) [@user.compactor](https://discourse.nixos.org/u/user.compactor)
#### Post date: [December 4, 2025, 10:07am UTC](https://discourse.nixos.org/t/cuda-builds-instead-of-fetching-from-flox-cache/72876/3 "2025-12-04T10:07:51Z")

</div>

Oh yes makes sense, everythings work now, many thanks! 🙂

---

<div class="post-metadata">

### Author: ![ron](https://discourse.nixos.org/user_avatar/discourse.nixos.org/ron/32/6170_2.png) [@ron](https://discourse.nixos.org/u/ron)
#### Post date: [December 12, 2025, 2:28am UTC](https://discourse.nixos.org/t/cuda-builds-instead-of-fetching-from-flox-cache/72876/4 "2025-12-12T02:28:08Z")

</div>

Thanks @TiltedToast ! We should definitely get more formal docs/FAQ pages in. If folks are thoughts let me know!

---

<div class="post-metadata">

### Author: ![juaningan](https://discourse.nixos.org/user_avatar/discourse.nixos.org/juaningan/32/6688_2.png) [@juaningan](https://discourse.nixos.org/u/juaningan)
#### Post date: [February 9, 2026, 10:56am UTC](https://discourse.nixos.org/t/cuda-builds-instead-of-fetching-from-flox-cache/72876/5 "2026-02-09T10:56:14Z")

</div>

I missed some messages in this conversation. Could you point out what finally fixed your problem?

---

<div class="post-metadata">

### Author: ![user.compactor](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/u/bc8723/32.png) [@user.compactor](https://discourse.nixos.org/u/user.compactor)
#### Post date: [February 9, 2026, 12:47pm UTC](https://discourse.nixos.org/t/cuda-builds-instead-of-fetching-from-flox-cache/72876/6 "2026-02-09T12:47:50Z")

</div>

I think the answer has been deleted. As far as I remember (it’s been few months 😅 ), the solution was to pin the floxpkgs with the unstable branch `floxpkgs.url = "github:flox/nixpkgs/unstable";`
