-
Notifications
You must be signed in to change notification settings - Fork 1
/
.chezmoi.toml.tmpl
53 lines (41 loc) · 1.23 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
{{- $environmentChoices := list "home" "work" -}}
{{- $environment := promptChoiceOnce . "environment.name" "What environment is this host on" $environmentChoices -}}
{{- $pinentry := lookPath "pinentry-tty" -}}
{{- if eq .chezmoi.os "darwin" -}}
{{- $bin := "/usr/local/MacGPG2/libexec/pinentry-mac.app/Contents/MacOS/pinentry-mac" -}}
{{- $binInfo := lstat $bin -}}
{{- if and $binInfo (eq $binInfo.type "file") -}}
{{- $pinentry = $bin -}}
{{- end -}}
{{- end -}}
{{- $ejsonDict := joinPath .chezmoi.sourceDir ".ejson/secrets.json" | ejsonDecrypt -}}
encryption = "gpg"
{{ $ejsonDict | toToml }}
[data.environment]
name = {{ $environment | quote }}
home = {{ eq $environment "home" }}
work = {{ eq $environment "work" }}
[data.work.features.proxies]
node.enabled = false
python.enabled = true
[diff]
exclude = ["scripts"]
[gpg]
recipient = {{ $ejsonDict.data.personal.email | quote }}
[hooks.init.pre]
command = "task"
args = [
"-d",
{{ .chezmoi.sourceDir | quote }},
]
[interpreters.fish]
command = "fish"
[pinentry]
command = {{ $pinentry | quote }}
[scriptEnv]
# whether to apply MacOS defaults or not
DEFAULTS = "0"
# general script debug
TRACE = "0"
VERBOSE = "0"
DOT_ENVIRONMENT = {{ $environment | quote }}