- Install nix on your system
curl https://nixos.org/nix/install | sh
. ~/.nix-profile/etc/profile.d/nix.sh
- Install direnv
nix-env -i direnv
- Add hook into shell by running
eval "$(direnv hook bash)"
, you will need to add this to.bash_profile
to make it presistant
Create a shell.nix file in your project with the following content. This has python 3.7 and pipenv as buildInputs