-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.chezmoi.toml.tmpl
42 lines (38 loc) · 1.18 KB
/
.chezmoi.toml.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
{{- /* Email setup */ -}}
{{- $email := env "EMAIL" -}}
{{- if not $email -}}
{{- $email = promptStringOnce . "email" "Email address" -}}
{{- end -}}
{{- /* Deciding whether the host has graphical GUI */ -}}
{{- $hasGUI := env "GUI" -}}
{{- if not $hasGUI -}}
{{- if eq .chezmoi.os "darwin" -}}
{{- $hasGUI = true -}}
{{- else -}}
{{- $hasGUI = promptBoolOnce . "hasGUI" "Does this machine have a GUI [y/n]" -}}
{{- end -}}
{{- end -}}
{{- /* Deciding whether the host is used at $work */ -}}
{{- $isWork := "" -}}
{{- if hasSuffix "infra.franta.us" .chezmoi.fqdnHostname -}}
{{- $isWork = false -}}
{{- else if hasSuffix "osc.edu" .chezmoi.fqdnHostname -}}
{{- $isWork = true -}}
{{- else -}}
{{- $isWork = promptBoolOnce . "isWork" "Is this machine used for work [y/n]" -}}
{{- end -}}
encryption = "gpg"
[gpg]
recipient = "0xB55027F11D7D24C8"
[data]
email = {{ $email | quote }}
hasGUI = {{ $hasGUI | quote }}
isWork = {{ $isWork | quote }}
[git]
autoCommit = true
[diff]
command = "nvim"
args = ["-d", "{{`{{ .Destination }}`}}", "{{`{{ .Target }}`}}"]
[merge]
command = "nvim"
args = ["-d", "{{`{{ .Destination }}`}}", "{{`{{ .Source }}", "{{ .Target }}`}}"]