84 lines
1.9 KiB
Django/Jinja
84 lines
1.9 KiB
Django/Jinja
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
|
|
{%- from "zsh/map.jinja" import zsh with context %}
|
|
|
|
if [[ $PATH != *"/usr/local/bin:/usr/local/sbin"* ]]
|
|
then
|
|
export PATH=$PATH:/usr/local/bin:/usr/local/sbin
|
|
fi
|
|
|
|
# Main environments variables
|
|
export EDITOR=nvim
|
|
export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
|
|
|
|
{% if zsh.config.golang -%}
|
|
# Golang settings
|
|
if [[ -d /usr/local/apps/golang && $PATH != *"golang"* ]]
|
|
then
|
|
export GOPATH=~/go
|
|
export GOROOT=/usr/local/apps/golang
|
|
export GO111MODULE=auto
|
|
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
|
|
fi
|
|
{%- endif %}
|
|
|
|
{% if zsh.config.rust -%}
|
|
# Rust settings
|
|
if [[ -d ~/.cargo/bin && $PATH != *"cargo"* ]]
|
|
then
|
|
export PATH=$PATH:$HOME/.cargo/bin
|
|
fi
|
|
{%- endif %}
|
|
|
|
{% if zsh.config.haproxy -%}
|
|
alias hap="hatop -t 127.0.0.1:9990"
|
|
{%- 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 git)
|
|
{%- else %}
|
|
plugins=(common-aliases sudo docker git ansible command-not-found systemd python nmap zsh-autosuggestions golang rust kubectl)
|
|
{%- endif %}
|
|
|
|
if [[ -f $ZSH/oh-my-zsh.sh ]]
|
|
then
|
|
source $ZSH/oh-my-zsh.sh
|
|
fi
|
|
|
|
# Regionals
|
|
{% set locale = salt['pillar.get']('locale')|default('en_US.UTF-8') %}
|
|
export LANG={{ locale }}
|
|
export LC_ADDRESS={{ locale }}
|
|
export LC_IDENTIFICATION={{ locale }}
|
|
export LC_MEASUREMENT={{ locale }}
|
|
export LC_MONETARY={{ locale }}
|
|
export LC_NAME={{ locale }}
|
|
export LC_NUMERIC={{ locale }}
|
|
export LC_PAPER={{ locale }}
|
|
export LC_TELEPHONE={{ locale }}
|
|
export LC_TIME={{ locale }}
|
|
|
|
# Neovim aliases
|
|
for i in v vi vim
|
|
do
|
|
alias $i=nvim
|
|
done
|
|
alias weather="curl -s wttr.in/caen"
|
|
|
|
alias mysql="mariadb"
|
|
|
|
# Misc settings
|
|
bindkey -e
|
|
unsetopt share_history
|