-[[ -f ~/.profile ]] && . ~/.profile
-[[ -f ~/.bashrc ]] && . ~/.bashrc
+include () {
+ [[ -f "$1" && -r "$1" ]] && source "$1"
+}
+
+include ~/.profile
+include ~/.nix-profile/etc/profile.d/nix.sh
+[[ $TERM = "eterm-color" || $TERM = "screen" ]] || include ~/.bashrc