-
Notifications
You must be signed in to change notification settings - Fork 0
/
.chezmoi.toml.tmpl
31 lines (24 loc) · 796 Bytes
/
.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
{{- $name := "" -}}
{{- $email := "" -}}
{{- $github := "" -}}
{{- $tz := "" -}}
{{- with (index . "user") -}}
{{- with (index . "name") -}}{{- $name = . -}}{{- end -}}
{{- with (index . "email") -}}{{- $email = . -}}{{- end -}}
{{- with (index . "github") -}}{{- $github = . -}}{{- end -}}
{{- with (index . "tz") -}}{{- $tz = . -}}{{- end -}}
{{- end -}}
{{- $authorized_keys := "" -}}
{{- with (index . "ssh") -}}
{{- with (index . "authorized_keys") -}}{{- $authorized_keys = . -}}{{- end -}}
{{- end -}}
[data]
[data.user]
name = {{ $name | quote }}
email = {{ $email | quote }}
github = {{ $github | quote }}
tz = {{ $tz | quote }}
[data.ssh]
authorized_keys = [{{ with $authorized_keys}}{{ range . }}
{{ . | quote }},{{ end }}
{{ end }}]