-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.chezmoi.yaml.tmpl
39 lines (33 loc) · 1.19 KB
/
.chezmoi.yaml.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
{{- /* Checks if running interactively, which is not the case for GitHub Codespaces */ -}}
{{- $interactive := stdinIsATTY -}}
{{- /* Initializes the name variable with a default value */ -}}
{{- $name := "stevewm" -}}
{{- /* 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 := "34654219+stevewm@users.noreply.github.com" -}}
{{- if hasKey . "email" -}}
{{- $email = .email -}}
{{- else if $interactive -}}
{{- $email = promptString "email" $email -}}
{{- end -}}
{{- /* is it a personal device? */ -}}
{{- $personal := "true" -}}
{{- if hasKey . "personal" -}}
{{- $personal = .personal -}}
{{- else if $interactive -}}
{{- $personal = promptString "personal device" $personal -}}
{{- end -}}
{{- if $interactive -}}
{{- writeToStdout "💡 Tip: you can re-enter the info with `chezmoi init --data=false`.\n" -}}
{{- end -}}
sourceDir: "{{ .chezmoi.sourceDir }}"
data:
name: "{{ $name }}"
email: "{{ $email }}"
personal: "{{ $personal }}"