-
Notifications
You must be signed in to change notification settings - Fork 0
/
.chezmoi.toml.tmpl
60 lines (51 loc) · 1.28 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
53
54
55
56
57
58
59
60
# vim:ft=toml
# TODO: How to make env var conditional ?
#
# Used to customize configuration when doing a `chezmoi init $repos`.
#
{{/* Boolean */}}
{{- $minimal := false -}}
{{- $secret := false -}}
{{- $bw := false -}}
{{- $pass := false -}}
{{- "" -}}
{{- $git_name := "romariorobby" -}}
{{- $git_email := "[email protected]" -}}
{{- if (env "BW") -}}
{{- $secret = true -}}
{{- $pass = false -}}
{{- $bw = true -}}
{{- end -}}
{{- if (env "PASS") -}}
{{- $secret = true -}}
{{- $pass = true -}}
{{- $bw = false -}}
{{- end -}}
{{- if (env "MINIMAL") -}}
{{- $minimal = true -}}
{{- end }}
{{- if (env "PROMPT") }}
{{- $minimal = promptBool "minimal" -}}
{{- if $minimal -}}
{{- $bw = false -}}
{{- $pass = false -}}
{{- else }}
{{- $bw = promptBool "bw" -}}
{{- $pass = promptBool "pass" -}}
{{- end -}}
# {{- $name := promptString "Username for Chezmoi" -}}
{{- $git_name := promptString "[Git] Username for author/commiter" -}}
{{- $git_email := promptString "[Git] Email Address for author/commiter" -}}
{{- end -}}
# GPG
encryption = "gpg"
[gpg]
symmetric = "true"
[data]
minimal = {{ $minimal }}
secret = {{ $secret }}
pass = {{ $pass }}
bw = {{ $bw }}
[data.git]
name = "{{ $git_name }}"
email = "{{ $git_email }}"