-
Notifications
You must be signed in to change notification settings - Fork 0
/
.chezmoi.toml.tmpl
44 lines (38 loc) · 1.48 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
{{- /* Prompt on first init, but don't re-prompt on subsequent init if the data is there. */ -}}
{{- /* https://www.chezmoi.io/docs/how-to/#re-create-your-config-file */ -}}
{{- /* Support non-interactive installation for Codespaces. */ -}}
{{- /* https://www.chezmoi.io/docs/how-to/#use-chezmoi-with-github-codespaces-visual-studio-codespaces-or-visual-studio-code-remote---containers */ -}}
{{- $codespaces:= env "REMOTE_CONTAINERS" | not | not -}}
{{- $email := "" -}}
{{- $storeSecrets := false -}}
{{- $installApps := false -}}
{{- if $codespaces -}}
{{- $email := "[email protected]" -}}
{{- $storeSecrets := false -}}
{{- $installApps := false -}}
{{- else -}}
{{- if (hasKey . "email") -}}
{{- $email = .email -}}
{{- else -}}
{{- $email = promptString "Email for .gitconfig" -}}
{{- end -}}
{{- /* If this is false, don't use anything from bitwarden. */ -}}
{{- if (hasKey . "store_secrets") -}}
{{- $storeSecrets = .store_secrets -}}
{{- else -}}
{{- $storeSecrets = eq (promptString "Store secrets on this machine (y/N)") "y" -}}
{{- end -}}
{{- if (hasKey . "install_apps") -}}
{{- $installApps = .install_apps -}}
{{- else -}}
{{- $installApps = eq (promptString "Install applications (y/N)") "y" -}}
{{- end -}}
{{- end -}}
sourceDir = {{ .chezmoi.sourceDir | quote }}
[merge]
command = "meld"
[data]
email = {{ $email | quote }}
store_secrets = {{ $storeSecrets }}
install_apps = {{ $installApps }}
codespaces = {{ $codespaces }}