-
Notifications
You must be signed in to change notification settings - Fork 0
/
desktop.sls
82 lines (71 loc) · 2.07 KB
/
desktop.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
{% import_yaml "config.yaml" as config %}
include:
- fonts
Xresources:
file.managed:
- name: /home/{{ config.username }}/.Xresources
- source: salt://files/desktop/X11/Xresources
- mode: 644
- user: {{ config.username }}
- group: {{ config.group }}
trackpad-config:
file.managed:
- name: /etc/X11/xorg.conf.d/90-trackpad.conf
- source: salt://files/desktop/X11/xorg.conf.d/90-trackpad.conf
- mode: 644
- user: root
- group: root
secure-copy-paste-sequence:
file.replace:
- name: /etc/qubes/guid.conf
- pattern: '#?secure_(copy|paste)_sequence = "Ctrl-Shift-(c|v)";'
- repl: 'secure_\1_sequence = "Mod4-Ctrl-Shift-\2";'
qubes-repo-contrib:
pkg.installed: []
i3:
pkg.installed:
- name: i3-gaps
- require:
- pkg: qubes-repo-contrib
i3-config:
file.managed:
- name: /home/{{ config.username}}/.config/i3/config
- requires:
- file: i3-autolayout-script
- source: salt://files/desktop/i3/config
- mode: 644
- user: {{ config.username }}
- group: {{ config.group }}
i3-autolayout-script:
file.managed:
- name: /home/{{ config.username }}/.local/bin/i3-autolayout.py
- requires:
- cmd: i3-autolayout-install-deps
- source: salt://files/desktop/i3/i3-autolayout.py
- mode: 755
- user: {{ config.username }}
- group: {{ config.group }}
# TODO: Come up with a better way to manage these dependencies. Remember that
# dom0 intentionally cannot connect to the internet.
i3-autolayout-install-deps:
file.recurse:
- name: /tmp/i3-autolayout-deps
- source: salt://files/desktop/i3/i3-autolayout-deps
cmd.wait:
- name: pip3 install --user *.whl
- cwd: /tmp/i3-autolayout-deps
- runas: {{ config.username }}
- watch:
- file: i3-autolayout-install-deps
rofi:
pkg.installed:
- require:
- pkg: qubes-repo-contrib
rofi-config:
file.recurse:
- name: /home/{{ config.username}}/.config/rofi/
- source: salt://files/desktop/rofi
- dir_mode: 755
- file_mode: 644
- user: {{ config.username }}
- group: {{ config.group }}