updated zsh state
This commit is contained in:
parent
18300a1b1d
commit
97fb5734d5
@ -1,4 +1,8 @@
|
|||||||
---
|
---
|
||||||
zsh:
|
zsh:
|
||||||
enabled: true
|
enabled: true
|
||||||
config: {}
|
config:
|
||||||
|
minimal: false
|
||||||
|
golang: true
|
||||||
|
rust: true
|
||||||
|
android: false
|
6
states/zsh/map.jinja
Normal file
6
states/zsh/map.jinja
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{%- import_yaml "zsh/defaults.yaml" as default_settings -%}
|
||||||
|
|
||||||
|
{%- set defaults = salt['grains.filter_by'](default_settings, default='zsh') -%}
|
||||||
|
|
||||||
|
{%- set zsh = salt['pillar.get']('zsh', default=defaults, merge=True) -%}
|
||||||
|
{%- set users = salt['pillar.get']('users', default=defaults, merge=True) -%}
|
@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
{%- from "users/map.jinja" import users with context -%}
|
{%- from "zsh/map.jinja" import users with context %}
|
||||||
{%- for user in users %}
|
{%- for user in users %}
|
||||||
{%- if user.enabled %}
|
{%- if user.enabled %}
|
||||||
zshrc-user-{{ user.name }}:
|
zshrc-user-{{ user.name }}:
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
|
## {{ salt['pillar.get']('salt_managed', default='Salt Managed') }}
|
||||||
|
{%- from "zsh/map.jinja" import zsh with context %}
|
||||||
|
|
||||||
# Main environments variables
|
# Main environments variables
|
||||||
export EDITOR=vim
|
export EDITOR=vim
|
||||||
export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
|
export JAVA_OPTS='-XX:+IgnoreUnrecognizedVMOptions --add-modules java.se.ee'
|
||||||
|
|
||||||
|
{% if zsh.config.golang -%}
|
||||||
# Golang settings
|
# Golang settings
|
||||||
if [[ -d /usr/local/apps/go ]]
|
if [[ -d /usr/local/apps/go ]]
|
||||||
then
|
then
|
||||||
@ -12,44 +13,44 @@ then
|
|||||||
export GOROOT=/usr/local/apps/go
|
export GOROOT=/usr/local/apps/go
|
||||||
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
|
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
|
||||||
fi
|
fi
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{% if zsh.config.rust -%}
|
||||||
# Rust settings
|
# Rust settings
|
||||||
if [[ -d ~/.cargo/bin ]]
|
if [[ -d ~/.cargo/bin ]]
|
||||||
then
|
then
|
||||||
export PATH=$PATH:$HOME/.cargo/bin
|
export PATH=$PATH:$HOME/.cargo/bin
|
||||||
fi
|
fi
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{% if zsh.config.android -%}
|
||||||
# Android settings
|
# Android settings
|
||||||
if [[ -d ~/Android ]]
|
if [[ -d ~/Android ]]
|
||||||
then
|
then
|
||||||
export ANDROID_SDK_ROOT=~/Android
|
export ANDROID_SDK_ROOT=~/Android
|
||||||
fi
|
fi
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
# Oh my ZSH settings
|
# Oh my ZSH settings
|
||||||
export ZSH=/usr/share/oh-my-zsh
|
export ZSH=/usr/share/oh-my-zsh
|
||||||
ZSH_THEME="jreese"
|
ZSH_THEME="jreese"
|
||||||
DISABLE_AUTO_UPDATE="true"
|
DISABLE_AUTO_UPDATE="true"
|
||||||
|
{%- if zsh.config.minimal %}
|
||||||
|
plugins=(common-aliases docker)
|
||||||
|
{%- else %}
|
||||||
plugins=(common-aliases sudo docker salt git ansible command-not-found systemd python nmap zsh-autosuggestions)
|
plugins=(common-aliases sudo docker salt git ansible command-not-found systemd python nmap zsh-autosuggestions)
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{#
|
||||||
#for example
|
#for example
|
||||||
#plugins=(common-aliases sudo docker salt git ansible command-not-found virtualenvwrapper tmux systemd python golang nmap)
|
#plugins=(common-aliases sudo docker salt git ansible command-not-found virtualenvwrapper tmux systemd python golang nmap)
|
||||||
|
#}
|
||||||
|
|
||||||
if [[ -f $ZSH/oh-my-zsh.sh ]]
|
if [[ -f $ZSH/oh-my-zsh.sh ]]
|
||||||
then
|
then
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Acme settings
|
|
||||||
if [[ -f /root/.acme.sh/acme.sh.env ]]
|
|
||||||
then
|
|
||||||
. /root/.acme.sh/acme.sh.env
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Misc settings
|
# Misc settings
|
||||||
bindkey -e
|
bindkey -e
|
||||||
unsetopt share_history
|
unsetopt share_history
|
Loading…
Reference in New Issue
Block a user