keep shell.nix files aside from your source trees
cf21685f — Arnout Engelen 1 year, 1 month ago
Make the directory if it doesn't exist
a3392beb — Arnout Engelen 1 year, 2 months ago
Add section linking to similar projects
da6a9e3c — Arnout Engelen 1 year, 2 months ago
Add '-e' option to edit the shell.nix


browse  log 



You can also use your local clone with git send-email.


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


The Nix package manager allows you to keep per-project dependency/environment specifications in shell.nix files.

With nix-shell-git you can load your shell.nix files from a separate ~/nix-shells tree, making it easy version and share them.


Create a ~/nix-shells directory to hold your shell.nix files. The format follows your git repo host- and path names. For an example, see my nix-shells.

Then, just cd into a project directory and run nix-shell-git to start a nix-shell with the shell.nix for that project.



#Similar projects

There are also other ways to keep some Nix configurations aside the project repo:

  • git-along integrates with git more tightly. TBQH I don't quite understand where the files actually go :).
  • shellbit puts them all under a top-level nix expression, so you can load them right into nix-shell with -A. An example repo is at nixels.
  • nix-environments also just has a top-level nix expression without any particular tooling.

Know more? Please share ;)