Keep shell.nix files 'aside' source repo's

I love how you can keep per-project dependencies and configuration in shell.nix.

For personal projects I happily commit my shell.nix to the project repo, but of course that’s not an option for ‘3rd-party’ projects.

To easily version and share my shell.nix files, I wrote a quick script to load them from a separate ~/nix-shells tree: https://git.sr.ht/~raboof/nix-shell-git .

Does this make sense? Are there other options you’d recommend?

2 Likes

Any idea how to use it with direnv?

I haven’t used direnv (I like ‘explicitly’ entering the nix-shell), but perhaps it would be possible to add this feature to lorri as well?

Similar threads:

3 Likes

Oh very cool, I can’t believe I missed that.

As a first step I added a ‘Similar projects’ section to https://git.sr.ht/~raboof/nix-shell-git#similar-projects, but indeed perhaps eventually I should contribute to one of these instead of having my own :smiley: