-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_once_20-configure-system-linux.sh.tmpl
58 lines (48 loc) · 1.6 KB
/
run_once_20-configure-system-linux.sh.tmpl
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
{{ if (eq .chezmoi.os "linux") -}}
#!/bin/bash
# Distro specifc
{{ if (eq .os_id "linux-void")}}
{{ if and (stat "/etc/sv/seatd") (not (stat "/var/service/seatd")) }}
# Set up seatd
sudo ln -s /etc/sv/seatd /var/service
sudo usermod -a -G _seatd {{ (env "USER") }}
{{- end -}}
{{ if and (stat "/etc/sv/dbus") (not (stat "/var/service/dbus")) }}
# Set up dbus
sudo ln -s /etc/sv/dbus /var/service
{{ end }}
{{ if and (stat "/etc/sv/iwd") (not (stat "/var/service/iwd")) }}
# Set up iwd
sudo ln -s /etc/sv/iwd /var/service
{{ end }}
{{ if and (stat "/etc/sv/ead") (not (stat "/var/service/ead")) }}
# Set up ead
sudo ln -s /etc/sv/ead /var/service
{{ end }}
{{ if and (stat "/etc/sv/sshd") (not (stat "/var/service/sshd")) }}
# Set up openssh
sudo ln -s /etc/sv/sshd /var/service
{{ end }}
{{ if and (stat "/etc/sv/chronyd") (not (stat "/var/service/chronyd")) }}
# Set up openntpd
sudo ln -s /etc/sv/chronyd /var/service
{{ if (not (stat "/etc/localtime")) }}
sudo ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime
{{ end }}
{{ end }}
{{ if and (stat "/etc/sv/bluetoothd") (not (stat "/var/service/bluetoothd")) }}
# Set up bluetooth
sudo ln -s /etc/sv/bluetoothd /var/service
{{- end -}}
{{ end }}
# General config
{{ if (contains "/sh" (env "SHELL")) }}
sudo -u {{ (env "USER") }} chsh -s {{ or (lookPath "fish") (lookPath "bash") | quote }}
{{- end }}
{{ if and (lookPath "gpg") (not (stat (list (env "HOME") "/.gnupg/pubring.kbx" | join ""))) -}}
export GPG_TTY=$(tty)
{{ secret.command }} get {{ quote (cat .email "GPG private key" ) }} | gpg --import --batch
unset GPG_TTY
{{- end }}
# vim: ft=chezmoitmpl
{{- end }}