If you don't already have nix set up on your machine, follow this steps!
sh <(curl -L https://nixos.org/nix/install) --daemon
mkdir -p ~/.config/nix/
echo -e 'max-jobs = auto\nexperimental-features = nix-command flakes' > ~/.config/nix/nix.conf
copy & paste the entire entry in your terminal:
sudo tee /etc/nix/nix.conf <<EOF
build-users-group = nixbld
substituters = https://cache.nixos.org/
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
EOF
nix-env -i direnv nix-direnv
echo "source $HOME/.nix-profile/share/nix-direnv/direnvrc" >~/.direnvrc
echo "[[ -f ~/.bashrc ]] && . ~/.bashrc" >~/.bash_profile
echo 'eval "$(direnv hook bash)"' >>~/.bashrc
echo 'eval "$(direnv hook zsh)"' >>~/.zshrc