1
0
Fork 0

bashrc: source home-manager session variables only on non-NixOS distros

This commit is contained in:
Pratham Patel 2024-02-10 18:34:44 +05:30
parent 7b8a8cbe7b
commit c8da353ded
Signed by: thefossguy
SSH Key Fingerprint: SHA256:/B3wAg7jnMEBQ2JwkebbS/eXVZANDmqRfnd9QkIhxMI
1 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,12 @@ if [[ "$(uname -s)" == 'Linux' ]]; then
alias pbcopy='wl-copy'
fi
# source the vars only if we are not on NixOS
if ! grep 'ID=nixos' /etc/os-release > /dev/null; then
[[ -f "${HOME}/.nix-profile/etc/profile.d/hm-session-vars.sh" ]] && \
"${HOME}/.nix-profile/etc/profile.d/hm-session-vars.sh"
fi
elif [[ "$(uname -s)" == 'Darwin' ]]; then
GNU_LS="$(command -v gls)"
GNU_GREP="$(command -v ggrep)"