paulbsd-salt/states/zsh/zprofile.j2
2022-10-01 20:11:24 +02:00

65 lines
1.4 KiB
Django/Jinja

## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
{%- from "zsh/map.jinja" import zsh with context %}
export PATH=$PATH:/usr/local/bin:/usr/local/bin
# Main environments variables
export EDITOR=vim
export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
{% if zsh.config.golang -%}
# Golang settings
if [[ -d /usr/local/apps/golang ]]
then
export GOPATH=~/go
export GOROOT=/usr/local/apps/golang
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
fi
{%- endif %}
{% if zsh.config.rust -%}
# Rust settings
if [[ -d ~/.cargo/bin ]]
then
export PATH=$PATH:$HOME/.cargo/bin
fi
{%- endif %}
{% if zsh.config.android -%}
# Android settings
if [[ -d ~/Android ]]
then
export ANDROID_SDK_ROOT=~/Android
fi
{%- endif %}
# Oh my ZSH settings
export ZSH=/usr/share/oh-my-zsh
ZSH_THEME="jreese"
DISABLE_AUTO_UPDATE="true"
{%- if zsh.config.minimal %}
plugins=(common-aliases)
{%- else %}
plugins=(common-aliases sudo docker salt git ansible command-not-found systemd python nmap zsh-autosuggestions golang rust kubectl)
{%- endif %}
{#
#for example
#plugins=(common-aliases sudo docker salt git ansible command-not-found virtualenvwrapper tmux systemd python golang nmap)
#}
if [[ -f $ZSH/oh-my-zsh.sh ]]
then
source $ZSH/oh-my-zsh.sh
fi
# Neovim aliases
for i in v vi vim
do
alias $i=nvim
done
alias weather="curl -s wttr.in/caen"
# Misc settings
bindkey -e
unsetopt share_history