Skip to content

Instantly share code, notes, and snippets.

@jeovazero
Last active March 19, 2022 05:50
Show Gist options
  • Save jeovazero/0dc4a2f25dd648c9c861b6725b567c82 to your computer and use it in GitHub Desktop.
Save jeovazero/0dc4a2f25dd648c9c861b6725b567c82 to your computer and use it in GitHub Desktop.

Install

$ nix-env -f '<nixpkgs>' -iA nix-direnv direnv

Configure

Add to $HOME/.direnvrc:

source $HOME/.nix-profile/share/nix-direnv/direnvrc

Add to ~/.bashrc file:

eval "$(direnv hook bash)"

Run in your project:

$ echo "use nix" >> .envrc
$ direnv allow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment