~raboof/nix-shell-git

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

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~raboof/nix-shell-git
read/write
git@git.sr.ht:~raboof/nix-shell-git

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

#nix-shell-git

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

#Why?

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.

#Usage

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.

#TODO

here

#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 ;)