A fast, persistent use_nix/use_flake implementation for direnv [maintainer=@Mic92 / @bbenne10]
Go to file
Jörg Thalheim 6b4c1f64f7
Merge pull request #7 from lrworth/master
Restore (NIX_)SSL_CERT_FILE to original value
2020-04-01 14:36:41 +01:00
direnvrc Restore (NIX_)SSL_CERT_FILE to original value 2020-04-01 11:39:31 +11:00
LICENSE Initial commit 2019-09-27 08:43:48 +01:00
README.md Document compatibility problems 2020-03-11 10:32:13 +00:00

nix-direnv

A fast, persistent use_nix implementation for direnv. Prominent features:

  • significantly faster after the first run by caching the nix-shell environment
  • prevents garbage collection of build dependencies by symlinking the resulting shell derivation in the user's gcroots (Life is too short to loose your build cache of your project if you are in a plane without internet connection)

USAGE

$ git clone https://github.com/nix-community/nix-direnv $HOME/.nix-direnv

Then source the direnvrc from this repository in your own .direnvrc

# put this in ~/.direnvrc
source $HOME/.nix-direnv/direnvrc

For derivations to persist garbage collection, set the following in nix.conf:

keep-derivations = true
keep-outputs = true

Known Bugs

At the moment nix-direnv depends on gnugrep and a modern bash version. This might lead to problems on macOS. As a work-around we suggest to install direnv/grep via nix or homebrew.