-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshenv.tmpl
66 lines (55 loc) · 1.92 KB
/
dot_zshenv.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
export PATH=$HOME/.local/bin:$HOME/bin:/usr/local/bin:$PATH
# Ensure gpg can prompt input from an available tty
export GPG_TTY=$(tty)
BREW_HOME="/home/linuxbrew/.linuxbrew"
BREW_BINARY="$BREW_HOME"/bin/brew
if [[ -d /home/linuxbrew/ && -f "$BREW_BINARY" ]]; then
{{ if (eq .chezmoi.group "devbox") -}}
export PATH="$PATH:"$BREW_HOME"/bin:"$BREW_HOME"/sbin"
{{- else }}
# Load (home)brew
eval "$("$BREW_BINARY" shellenv)"
{{- end }}
{{ if .system.multi_user_system -}}
# Impersonate brew management user
alias brew="sudo -Hu {{ .system.brew_multi_user }} $BREW_BINARY"
{{- end }}
fi
if [[ -d "$HOME/.pyenv" ]]; then
# Enable pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
if [[ -f $(brew --prefix nvm)/nvm.sh ]]; then
source $(brew --prefix nvm)/nvm.sh
fi
if command -v cargo &>/dev/null; then
# Add Cargo's bin dir to make cargo (rust) execs available
export PATH="$PATH:$HOME/.cargo/bin"
fi
if [[ -d "$BREW_HOME"/lib/ruby" ]]; then
# Add Ruby's exec dir to make Ruby execs available
export PATH="$PATH:"$BREW_HOME"/lib/ruby/gems/3.1.0/bin"
fi
if [[ -d "$BREW_HOME"/opt/clang-format" ]]; then
export PATH=""$BREW_HOME"/opt/clang-format/bin:$PATH"
fi
{{ if (eq .chezmoi.os "linux") -}}
{{- if (.chezmoi.kernel.osrelease | lower | contains "microsoft") -}}
# WSL-specific code
if [[ -d "/mnt/c/Users/timor.g/AppData/Local/Programs/Microsoft VS Code/bin/" ]]; then
export PATH="$PATH:/mnt/c/Users/timor.g/AppData/Local/Programs/Microsoft VS Code/bin/"
fi
{{- end }}
{{- end -}}
{{ if .personal.work_env -}}
# Load work-generic profile
source {{ .system.work_generic_dotfiles_profile }}
# Load work-generic env file if exists
if [[ -v "WORK_ZSH_ENV_EXTENSION" && -f "$WORK_ZSH_ENV_EXTENSION" ]]; then
source "$WORK_ZSH_ENV_EXTENSION"
fi
{{- end }}