dotfiles/zsh/zprofile

86 lines
2.0 KiB
Bash

# vim: filetype=zsh
SCRIPTPATH=$HOME/.config/dotfiles/zsh
# google cloud sdk
if [[ -a "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc" ]]; then
source "/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"
fi
# rust additions
if [[ -a "$HOME/.cargo/bin" ]]; then
export PATH="$HOME/.cargo/bin:$PATH"
fi
# krew additions
if [[ -a "$HOME/.krew" ]]; then
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
fi
# pythonpath additions
if [[ -a "$HOME/src/oreilly/tools/chassis" ]]; then
export PYTHONPATH="${PYTHONPATH}:$HOME/src/oreilly/tools/chassis"
fi
# Android SDK additions
if [[ -a "$HOME/Library/Android/sdk/platform-tools" ]]; then
export PATH="$HOME/Library/Android/sdk/platform-tools:$PATH"
fi
if [[ -a "$HOME/Library/Android/sdk/emulator" ]]; then
export PATH="$HOME/Library/Android/sdk/emulator:$PATH"
fi
# Local bin additions
if [[ -d "$HOME/bin" ]]; then
export PATH="$HOME/bin:$PATH"
fi
# homebrew
if [[ -a "/opt/homebrew/bin/brew" ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
# asdf
if [[ -d "$HOME/.asdf/shims" ]]; then
export PATH="$HOME/.asdf/shims:$PATH"
fi
# env
export EDITOR=nvim
export GOPATH=~/src/golang
export GOBIN=$GOPATH/bin
export PATH=~/bin:$GOBIN:$PATH
export XDG_CONFIG_HOME=$HOME/.config
export TALOSCONFIG=$XDG_CONFIG_HOME/talos/config.yaml
export GNUPGHOME=$XDG_CONFIG_HOME/gnupg
kubeconfig=(
$XDG_CONFIG_HOME/kube/k8s-dev.yaml
$XDG_CONFIG_HOME/kube/k8s.yaml
$XDG_CONFIG_HOME/kube/k8s-old.yaml
$XDG_CONFIG_HOME/kube/gke.yaml
)
export KUBECONFIG=${(j.:.)kubeconfig}
if [[ -d "/opt/homebrew/share/google-cloud-sdk/bin" ]]; then
export PATH=/opt/homebrew/share/google-cloud-sdk/bin:$PATH
fi
# other files
source "$SCRIPTPATH/functions.zsh"
source "$SCRIPTPATH/aliases.zsh"
# private aliases
if [[ -a "$SCRIPTPATH/private.zsh" ]]; then
source $SCRIPTPATH/private.zsh
fi
# What OS are we running?
if [[ $(uname) == "Darwin" ]]; then
source $SCRIPTPATH/mac.zsh
else
# Assume *nix of some kind
source $SCRIPTPATH/linux.zsh
fi