-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_zprofile.tmpl
More file actions
43 lines (38 loc) · 1.21 KB
/
dot_zprofile.tmpl
File metadata and controls
43 lines (38 loc) · 1.21 KB
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
{{- $profile := "base" -}}
{{- $editor := or (get . "editor") "code --wait -n" -}}
{{- $devcontainerEditor := or (get . "devcontainerEditor") "vim" -}}
{{- if (get . "devcontainer") -}}
{{- $profile = "devcontainer" -}}
{{- else if (get . "work") -}}
{{- $profile = "work" -}}
{{- else if (get . "personal") -}}
{{- $profile = "personal" -}}
{{- end }}
export DOTFILES_PROFILE={{ $profile | quote }}
{{- if eq .chezmoi.os "darwin" }}
if [[ -x /opt/homebrew/bin/brew ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [[ -x /usr/local/bin/brew ]]; then
eval "$(/usr/local/bin/brew shellenv)"
fi
{{- end }}
export PATH="$HOME/.local/bin:$PATH"
{{- if (get . "devcontainer") }}
export EDITOR={{ $devcontainerEditor | quote }}
{{- else }}
export EDITOR={{ $editor | quote }}
{{- end }}
export VISUAL="$EDITOR"
{{- if not (get . "devcontainer") }}
export SSH_AUTH_SOCK="$HOME/.1password/agent.sock"
{{- end }}
{{- if and (eq .chezmoi.os "darwin") (not (get . "devcontainer")) }}
if [[ -f "$HOME/.orbstack/shell/init.zsh" ]]; then
source "$HOME/.orbstack/shell/init.zsh"
fi
{{- end }}
{{- if (get . "work") }}
if [[ -r "$HOME/.config/work/zsh/zprofile.zsh" ]]; then
source "$HOME/.config/work/zsh/zprofile.zsh"
fi
{{- end }}