Seamless Cachix use in Nix shell?

How do I set up a shell.nix so that when running nix-shell it seamlessly uses my Cachix cache? That is, someone downloads my repo, runs nix-shell, and it uses the Cachix cache without any further setup?

1 Like

It’s not entirely seamless because the person has to run a special flag to accept the config but take a look at this:

Thanks for the suggestion. Which flag do you mean? Also, do flakes work with nix-shell?

Oh, oops no. They work with nix develop.

It tells you the flag when you run it without it. It is --accept-flake-config. nix develop - Nix Reference Manual