Using nix shells without polluting repositories

Yes, that requires more bravery than on your private stuff :wink: Personally I used the path: ā€œhackā€ with direnv so I didn’t need to keep typing it out in those situations. And then mentally ignored the flake.nix, because adding it to global git ignores annoyed me for some reason.

I don’t have a clear yes or no to this one. Flake shells come with the massive downside of copying everything to the nix store constantly, and 4 years later there has been no visible progress on resolving this.

Detsys are pushing flakes hard now, so maybe that will be resolved in the near future. But I was hoping for that two years ago, and as I see it flake stabilization is at least another two years out…

The main advantage is the input handling - channels are bloody confusing and trip up new users all the time. When you share your flakes, making sure others get exactly the same nixpkgs commits is useful, too.

Personally I use flakes because of that input handling and just accept the various annoyances.

If you don’t care for sharing your flake.nix though, I could see it argued that just learning how to pin your channels to your system flake inputs and using shell.nix is much more ergonomic.

That does require some semi-advanced system config though: Do flakes also set the system channel? - #16 by peterhoeg

4 Likes