-
Notifications
You must be signed in to change notification settings - Fork 0
/
.chezmoi.toml.tmpl
52 lines (47 loc) · 1.6 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
43
44
45
46
47
48
49
50
51
52
{{- /* Checks if running interactively */ -}}
{{- $interactive := stdinIsATTY -}}
{{- /* Template file for chezmoi config file */ -}}
{{- $gnome := false -}}{{/* true if this machine is using gnome */}}
{{- $personal := false -}}{{/* true if this machine is personal */}}
{{- $desktop := false -}}{{/* true if this machine is a desktop */}}
{{- $server := false -}}{{/* true if this machine is a server */}}
{{- $headless := false -}}{{/* true if this machine is personal */}}
{{- if hasKey . "gnome" -}}
{{- $gnome = .gnome -}}
{{- else if $interactive -}}
{{- $gnome = promptBool "gnome" -}}
{{- end -}}
{{- if hasKey . "personal" -}}
{{- $personal = .personal -}}
{{- else if $interactive -}}
{{- $personal = promptBool "personal" -}}
{{- end -}}
{{- if hasKey . "desktop" -}}
{{- $desktop = .desktop -}}
{{- else if $interactive -}}
{{- $desktop = promptBool "desktop" -}}
{{- end -}}
{{- if hasKey . "server" -}}
{{- $server = .server -}}
{{- else if $interactive -}}
{{- $server = promptBool "server" -}}
{{- end -}}
{{- if hasKey . "headless" -}}
{{- $headless = .headless -}}
{{- else if $interactive -}}
{{- $headless = promptBool "headless" -}}
{{- end -}}
{{- if $interactive -}}
{{- writeToStdout "💡 Tip: you can re-enter your data with `chezmoi init --data=false`.\n" -}}
{{- end -}}
encryption = "age"
{{- if $personal }}
[age]
identity = "{{ .chezmoi.homeDir }}/.config/sops/age/chezmoi.txt"
recipient = "age19kk2hhldesux98t50r9wmdhdvj7xw29205gy58tj70m53p5dweksv70uh9"
{{- end }}
[data]
gnome = {{ $gnome }}
personal = {{ $personal }}
desktop = {{ $desktop }}
server = {{ $server }}