Skip to content

Instantly share code, notes, and snippets.

@felipellrocha
Created June 18, 2014 19:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felipellrocha/a5ca47a98f1174c6acb0 to your computer and use it in GitHub Desktop.
Save felipellrocha/a5ca47a98f1174c6acb0 to your computer and use it in GitHub Desktop.
zsh-shell:
pkg.installed:
- names:
- zsh
- git-core
{{ pillar['main_user'] }}:
user.present:
- uid: 1000
- gid: 1000
- fullname: MutualMind Admin
- home: /home/{{ pillar['main_user'] }}
- createhome: True
- shell: /bin/zsh
- password: {{ pillar['main_user_hash'] }}
- require:
- group: mmadm
- optional_groups:
- adm
- www-data
- admin
- vagrant
ssh_auth:
- present
- user: {{ pillar['main_user'] }}
- names:
{% for user in pillar['users'] %}
- {{ user['key'] }}
{% endfor %}
- require:
- user: mmadm
group.present:
- name: {{ pillar['main_user'] }}
- gid: 1000
file.managed:
- name: /etc/sudoers
- source: salt://sudo/sudoers
- template: jinja
- user: root
- mode: 0440
{% if grains['virtual'] == 'VirtualBox' %}
vagrant:
ssh_auth:
- present
- user: {{ pillar['main_user'] }}
- source: salt://keys/vagrant.pub
{% endif %}
omz:
git.latest:
- name: https://github.com/robbyrussell/oh-my-zsh.git
- rev: c79e5a97a906457d1778197bd4f29640d1917201
- target: /home/{{ pillar['main_user'] }}/.oh-my-zsh
- force:
{% set zsh_theme = 'gnzh-custom' %}
omz-theme:
file.managed:
- name: /home/{{ pillar['main_user'] }}/.oh-my-zsh/themes/{{ zsh_theme }}.zsh-theme
- source: salt://zsh/{{ zsh_theme }}.zsh-theme
/home/{{ pillar['main_user'] }}/.zshrc:
file.managed:
- user: {{ pillar['main_user'] }}
- source: salt://zsh/zshrc
- template: jinja
solarized-dircolors:
git.latest:
- name: https://github.com/seebi/dircolors-solarized.git
- target: /home/{{ pillar['main_user'] }}/dircolors-solarized
activate-dircolors:
file.append:
- name: /home/{{ pillar['main_user'] }}/.zshrc
- text: eval $(dircolors ~/dircolors-solarized/dircolors.256dark)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment