-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdot-zshenv
executable file
·86 lines (68 loc) · 2.52 KB
/
dot-zshenv
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
## All (login/non/interactive) shells ##
# unique these arrays
typeset -U path manpath
# exports
export LANG=en_US
export LANGUAGE=${LANG}.UTF-8
export LC_ALL=${LANG}.UTF-8
export LC_CTYPE=${LANG}.UTF-8
[[ -x nproc ]] && export MAKEFLAGS=-j$(nproc)
export TIG_DIFF_OPTS="--patience --ignore-all-space"
# binaries
[[ -d "$HOME/.local/bin" ]] && path=($HOME/.local/bin $path)
[[ -d "$HOME/bin" ]] && path+=($HOME/bin)
[[ -d "$HOME/.yarn/bin" ]] && path+=($HOME/.yarn/bin)
[[ -d "/usr/local/sbin" ]] && path+=(/usr/local/sbin)
# ruby
[[ -d "$GEM_HOME/bin" ]] && path=($GEM_HOME/bin $path)
# golang
[[ -d "/usr/local/go/bin" ]] && path+=(/usr/local/go/bin)
[[ -d "$HOME/go/bin" ]] && path+=($HOME/go/bin)
# pyenv
[[ -d "$HOME/.pyenv" ]] && export PYENV_ROOT="$HOME/.pyenv"
[[ -d "$HOME/.pyenv/bin" ]] && path=($PYENV_ROOT/bin $path)
[[ -d "$HOME/.pyenv/bin" ]] && eval "$(pyenv init -)"
# elixir
[[ -d "$HOME/.mix/escripts" ]] && path=($HOME/.mix/escripts $path)
# haskell
[[ -d "$HOME/.cabal/bin" ]] && path=($HOME/.cabal/bin $path)
# rust
[[ -d "$HOME/.cargo/bin" ]] && path=($HOME/.cargo/bin $path)
# nVidia - CUDA
if [[ -d /usr/local/cuda ]]; then
export CUDA_HOME=/usr/local/cuda
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$CUDA_HOME/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CUDA_HOME/lib"
path+=($CUDA_HOME/bin)
fi
# CUDA @ PopOS
if [[ -d /usr/lib/cuda ]]; then
export CUDA_HOME=/usr/lib/cuda
export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:$CUDA_HOME/lib"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CUDA_HOME/lib"
path+=($CUDA_HOME/bin)
fi
# macOS - Homebrew
if [[ -s "/opt/homebrew/bin/brew" ]]; then
brew_prefix=$(/opt/homebrew/bin/brew --prefix)
# On OSX edit /etc/paths to really change the order
path=(
${brew_prefix}/bin
${brew_prefix}/opt/node/bin
${brew_prefix}/opt/coreutils/bin
${brew_prefix}/opt/coreutils/libexec/gnubin
${brew_prefix}/opt/python/libexec/bin
${brew_prefix}/opt/ruby/bin
${brew_prefix}/opt/mysql-client/bin
$path
)
#export -TU MANPATH manpath
manpath=(${brew_prefix}/opt/coreutils/libexec/gnuman $manpath)
fi
# dotnet
[[ -d "$HOME/.dotnet/tools" ]] && path=($HOME/.dotnet/tools $path)
[[ -d "$HOME/.spicetify" ]] && path=($HOME/.spicetify $path)
[[ -d "$HOME/.ghcup/bin" ]] && path=($HOME/.ghcup/bin $path)
[[ -d "/usr/local/texlive/2023basic/bin/universal-darwin" ]] && path=(/usr/local/texlive/2023basic/bin/universal-darwin $path)
[[ -f ${HOME}/.awskeys.sh ]] && source ${HOME}/.awskeys.sh
[[ -f $HOME/.cargo/env ]] && source $HOME/.cargo/env