Skip to content

Instantly share code, notes, and snippets.

@cem2ran
Created January 5, 2021 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cem2ran/9c8bdcbd8d8e30518f000a3f6ebb0370 to your computer and use it in GitHub Desktop.
Save cem2ran/9c8bdcbd8d8e30518f000a3f6ebb0370 to your computer and use it in GitHub Desktop.
INSTALL_URL="https://releases.nixos.org/nix/nix-2.3.10/install"
# Install Nix (package manager)
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
sh -c "$(curl -L $INSTALL_URL)"
elif [[ "$OSTYPE" == "darwin"* ]]; then
sh -c "$(curl -L $INSTALL_URL)" --darwin-use-unencrypted-nix-store-volume
else
echo "Unsupported platform :("
return
fi
nix-env --install direnv gnugrep -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/5540dd9b9ba6ebad454c2b3d0d31557b9521378e.tar.gz
echo 'eval "$(direnv hook zsh)"' >> ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment