For all you CUDA users out there

Hi All,

I recently switched from my oldish AMD RX580 to a nVidia RTX3060, purely for CUDA capabilities.
My first surprise was my system rebuilding itself, due to CUDA being unfree and it took several hours.

OK, all good if that’s what needs to happen.

My next surprise was watching this recent nixOS conference and the take-away snippet for me was -

nix.settings.substituters = [ "" ];

Adding that greatly reduced rebuild times due to caching.
I scoured online and wikis for several days on CUDA and nixOS nvidia and no-where is this mentioned, that I found.

Add this one-liner if you’re system is using CUDA.


Thanks for sharing. There is a note on the CUDA wiki page, but I honestly missed it as well the first time I read that:

Cache: Using the cuda-maintainers cache is recommended! It will save you valuable time and electrons. Getting set up should be as simple as cachix use cuda-maintainers.

I don’t know if this is done automatically, but you should probably add the trusted key from the cuda-maintainers cachix as well, like the Binary Cache wiki page instructs:

  nix.settings = {
    substituters = [
    trusted-public-keys = [

Do note that your system needs to build at least once after you add this before it starts using the cache.


Ahh thanks @eljamm for updating this, much appreciated.
And I certainly did miss the cache mention on the CUDA wiki page - in my opinion, it should be a clear code block, for others.

As a new NVIDIA user, any and all tips and tricks are most welcome.
Thanks again

1 Like

I edited the Wiki and changed the note to a tip block. I also added a section for setting the cache up.

Hopefully this makes everything clearer.


great work and thanks for the wiki changes. hopefully this will help others to save their electrons :+1::pray: