-
Notifications
You must be signed in to change notification settings - Fork 1
/
.chezmoi.toml.tmpl
35 lines (31 loc) · 1.01 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
{{- /* Checks if running interactively, which is not the case for GitHub Codespaces */ -}}
{{- $interactive := stdinIsATTY -}}
{{- /* Initializes the name variable with a default value */ -}}
{{- $name := "Your Name" -}}
{{- /* If name was previously set, reuses it */ -}}
{{- if hasKey . "name" -}}
{{- $name = .name -}}
{{- /* Otherwise, if running interactively, prompts for a name */ -}}
{{- else if $interactive -}}
{{- $name = promptString "name" $name -}}
{{- end -}}
{{- /* Does the same for the email */ -}}
{{- $email := "[email protected]" -}}
{{- if hasKey . "email" -}}
{{- $email = .email -}}
{{- else if $interactive -}}
{{- $email = promptString "email" $email -}}
{{- end -}}
{{- if $interactive -}}
{{- writeToStdout "💡 Tip: you can re-enter your name and email with `chezmoi init --data=false`.\n" -}}
{{- end -}}
sourceDir = "{{ .chezmoi.sourceDir }}"
[data]
name = "{{ $name }}"
email = "{{ $email }}"
[edit]
apply = true
watch = true
encryption = "age"
[age]
passphrase = true