-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.sls
87 lines (72 loc) · 1.43 KB
/
config.sls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!stateconf yaml . jinja
#
# ZSH Config
#
# Variables
{% set directories = [
"zshrc.after.d",
"zshrc.before.d"
] %}
{% set before = [
"exports.zsh"
] %}
{% set after = [
"autoenv.zsh",
"aliases.zsh"
] %}
# Directories
{% for directory in directories %}
.{{ directory }}:
file:
- directory
- name: /home/vagrant/.{{ directory }}
- user: vagrant
- group: vagrant
- mode: 755
{% endfor %}
# Configuration Files
.zshrc:
file:
- managed
- name: /home/vagrant/.zshrc
- user: vagrant
- group: vagrant
- mode: 755
- source: salt://local_zsh/files/.zshrc
- require:
- pkg: .install::zsh
.theme:
file:
- managed
- name: /home/vagrant/.oh-my-zsh/themes/chris.zsh-theme
- user: vagrant
- group: vagrant
- source: 'salt://local_zsh/files/chris.zsh-theme'
- require:
- git: .install::oh_my_zsh
# Before
{% for file in before %}
.{{ file }}:
file:
- managed
- name: /home/vagrant/.zshrc.before.d/{{ file }}
- source: salt://local_zsh/files/{{ file }}
- user: vagrant
- group: vagrant
- mode: 755
- require:
- file: .zshrc.before.d
{% endfor %}
# After
{% for file in after %}
.{{ file }}:
file:
- managed
- name: /home/vagrant/.zshrc.after.d/{{ file }}
- source: salt://local_zsh/files/{{ file }}
- user: vagrant
- group: vagrant
- mode: 755
- require:
- file: .zshrc.after.d
{% endfor %}