Conditionally source nix-profile if needed on non-nixos machines

This commit is contained in:
Andrew R. M 2025-04-05 16:37:09 -04:00 committed by Andrew R. M.
parent 93a2836154
commit 29db01cdd6

View File

@ -4,6 +4,15 @@
set -ex
if ! which nix &>/dev/null; then
if [ -r "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
else
echo "Nix isn't available. Exiting now!"
exit 1
fi
fi
nix_packages=(
# Personal tools
"vimHugeX"