-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zprofile.tmpl
92 lines (75 loc) · 2.7 KB
/
dot_zprofile.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Close shell with five presses of CTRL-D
export IGNOREEOF=5
export LANG=en_US.UTF-8
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
# Load app configurations from separate configuration file.
if [[ -a "$HOME"/.bash_secrets ]]; then
source "$HOME"/.bash_secrets
fi
# Homebrew installs to its preferred prefix;
# - /usr/local for macOS Intel
# - /opt/homebrew for Apple Silicon
# - /home/linuxbrew/.linuxbrew for Linux
eval "$(/opt/homebrew/bin/brew shellenv)"
export PATH="$(brew --prefix python3)/bin:$PATH"
if [[ -f "$HOME/google-cloud-sdk/completion.zsh.inc" ]]; then
# Enable shell command completion for gcloud.
source "$HOME/google-cloud-sdk/path.zsh.inc"
source "$HOME/google-cloud-sdk/completion.zsh.inc"
fi
if (( ${+commands[lefthook]} )); then
export LEFTHOOK_HOME="$(brew --prefix lefthook)"
export PATH="$LEFTHOOK_HOME/bin:$PATH"
fi
# The preferred pager
if (( ${+commands[moar]} )); then
export PAGER='moar'
fi
#
# The preferred visual editor for local or set the remote
# visual editor. The EDITOR variable technically shouldn't be set to a
# "visual" editor like vi but something like ed
#
if (( ${+commands[zed]} )); then
export NVIM_SESSION="$XDG_CONFIG_HOME/nvim/session"
export VISUAL='zed --wait --new'
export EDITOR='zed --wait --new'
fi
if [[ -n $SSH_CONNECTION ]]; then
export VISUAL='zed --wait --new'
fi
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
export CURL_HOME="$(brew --prefix curl)"
export ICLOUD_DIR="$HOME/Library/Mobile Documents/com~apple~CloudDocs/"
export CHEZMOI_SOURCE_PATH="$(chezmoi source-path)"
# Add JetBrains toolbox scripts to path
export PATH="$HOME/.local/bin:$PATH"
if (( ${+commands[go]} )); then
export PATH="$(go env GOPATH)"/bin:$PATH.
fi
if (( ${+commands[cs]} )); then
# Scala application manager
# Add coursier bin directory to PATH
eval "$(cs install --env)"
# Define JAVA_HOME and add it to the PATH. Assign existing JAVA_HOME to CS_FORMER_JAVA_HOME
{{ if .chezmoi.config.data.sys_java_version }}
eval "$(cs java --jvm corretto:{{ .chezmoi.config.data.sys_java_version }} --env)"
{{ else }}
eval "$(cs java --jvm corretto:21 --env)"
{{ end }}
export PATH="$JAVA_HOME/bin:$PATH"
fi
# MacOS alerting from terminal
# https://github.com/vjeantet/alerter?tab=readme-ov-file
if [[ -f /opt/alerter/bin/alerter ]]; then
export PATH="$PATH:/opt/alerter/bin"
fi
{{ if (eq .chezmoi.username "tj.kolleh")}}
# Gaurded by one password
export NEW_RELIC_API_KEY={{ range (onepassword "eehrc6lejvajtfcpejah3e5uem").fields -}}
{{ if (eq .id "credential") -}}
{{ .value -}}
{{ end -}}
{{ end }}
{{ end }}