diff --git a/states/zsh/config.sls b/states/zsh/config.sls index 64ae4f9..b22995c 100644 --- a/states/zsh/config.sls +++ b/states/zsh/config.sls @@ -17,7 +17,7 @@ zsh-autosuggestions-repo: zsh-omz-profile: file.managed: - - name: /usr/share/zsh/zprofile + - name: /etc/zsh/zprofile - source: salt://zsh/zprofile.j2 - user: root - group: root diff --git a/states/zsh/zprofile.j2 b/states/zsh/zprofile.j2 index 7e6aa5c..b6dcf68 100644 --- a/states/zsh/zprofile.j2 +++ b/states/zsh/zprofile.j2 @@ -6,24 +6,33 @@ export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee' # Golang settings -export GOPATH=~/go -export GOROOT=/usr/local/apps/go -export PATH=$PATH:$GOROOT/bin:$GOPATH/bin +if [[ -d /usr/local/apps/go ]] +then + export GOPATH=~/go + export GOROOT=/usr/local/apps/go + export PATH=$PATH:$GOROOT/bin:$GOPATH/bin +fi # Rust settings -export PATH=$PATH:$HOME/.cargo/bin +if [[ -d ~/.cargo/bin ]] +then + export PATH=$PATH:$HOME/.cargo/bin +fi # Android settings -export ANDROID_HOME=~/Android +if [[ -d ~/Android ]] +then + export ANDROID_HOME=~/Android +fi # Oh my ZSH settings export ZSH=/usr/share/oh-my-zsh ZSH_THEME="jreese" DISABLE_AUTO_UPDATE="true" -plugins=(common-aliases sudo docker salt git ansible command-not-found systemd python golang nmap zsh-autosuggestions) +plugins=(common-aliases sudo docker salt git ansible command-not-found systemd python nmap zsh-autosuggestions) #for example #plugins=(common-aliases sudo docker salt git ansible command-not-found virtualenvwrapper tmux systemd python golang nmap) diff --git a/states/zsh/zshrc.j2 b/states/zsh/zshrc.j2 index 603f823..d87f18a 100644 --- a/states/zsh/zshrc.j2 +++ b/states/zsh/zshrc.j2 @@ -1,3 +1,3 @@ ## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }} -source /usr/share/zsh/zprofile \ No newline at end of file +source /etc/zsh/zprofile \ No newline at end of file