-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.chezmoi.toml.tmpl
91 lines (84 loc) · 2.69 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{{- $data := . }}
{{- $email := get . "email" -}}
{{- if not $email -}}
{{- $email = promptString "email" -}}
{{- end -}}
{{- $_ := set $data "github" (default (dict) (get $data "github")) -}}
{{- $_ := set $data "npm" (default (dict) (get $data "npm")) -}}
{{- $_ := set $data "storage" (default (dict) (get $data "storage")) -}}
{{- $_ := set $data "toolchains" (default (dict) (get $data "toolchains")) -}}
{{- $sshagent := "gpg" -}}
{{- if or (eq .chezmoi.os "darwin") (promptBool "Use 1Password ssh agent") -}}
{{- $sshagent = "1password" -}}
{{- end -}}
{{- $github := list "name" "tokenname" }}
{{- $npm := list "tokenname" }}
{{- $toolchains := list "php" "deno" "node" "rust" "java" "elixir" "go" "kubernetes" "swift" }}
{{- $storage := list "postgres" "sqlite" "mysql" }}
{{- $personal := false -}}
{{- $work := false -}}
{{- $isWsl := false -}}
{{- if eq .chezmoi.os "linux" -}}
{{- if .chezmoi.kernel.osrelease | lower | contains "microsoft" -}}
{{- $isWsl = true -}}
{{- end -}}
{{- end -}}
{{- $VAULT_ID := "c4prpuzlxrox5pjph36zqnnvge" -}}
{{- $ACCOUNT_ID := "GIFANVXR5RGWZE5T2QIURRYYPE" -}}
encryption = "gpg"
remove = true
[data]
email = {{ $email | quote }}
personal = {{ $personal }}
wsl = {{ $isWsl }}
sshagent = {{ $sshagent | quote }}
[data.name]
full = "Wesley Klop"
first = "Wesley"
last = "Klop"
[data.github]
{{- range $github }}
{{- if not (hasKey $data.github .) }}
{{- $_ := set $data.github . (promptString .) }}
{{- end }}
{{ . }} = {{ get $data.github . | quote }}
{{- end }}
token = {{ (get (onepasswordItemFields "zq2crwzfldgqolsqkfou354ob4" $VAULT_ID $ACCOUNT_ID) $data.github.tokenname).value | quote }}
[data.npm]
{{- range $npm }}
{{- if not (hasKey $data.npm .) }}
{{- $_ := set $data.npm . (promptString .) }}
{{- end }}
{{ . }} = {{ get $data.npm . | quote }}
{{- end }}
token = {{ (get (onepasswordItemFields "zafsxtaw5fffpmohbn4olf7swq" $VAULT_ID $ACCOUNT_ID) $data.npm.tokenname).value | quote }}
[data.toolchains]
{{- range $toolchains }}
{{- if not (hasKey $data.toolchains .) }}
{{- $_ := set $data.toolchains . (promptBool .) }}
{{- end }}
{{ . }} = {{ get $data.toolchains . }}
{{- end }}
[data.storage]
{{- range $storage }}
{{- if not (hasKey $data.storage .) }}
{{- $_ := set $data.storage . (promptBool .) }}
{{- end }}
{{ . }} = {{ get $data.storage . }}
{{- end }}
[data.automation]
update = false
[secret]
command = "op"
[git]
autoAdd = true
autoCommit = false
[gpg]
recipient = {{ $email | quote }}
{{- if eq .chezmoi.os "windows" }}
[interpreters.ps1]
command = "pwsh"
arguments = ["-NoLogo"]
[cd]
command = "pwsh"
{{- end }}