Add chezmoi template variables

This commit is contained in:
Yuri Moens
2025-03-12 08:58:33 +01:00
parent bee87e7d02
commit 1f0b4c7f12

26
.chezmoi.toml.tmpl Normal file
View File

@ -0,0 +1,26 @@
{{- $profile := false -}}
{{- if eq (substr 0 3 .chezmoi.hostname) "lx-" -}}
{{- $profile = "sfpd" -}}
{{- else -}}
{{- $profile = promptStringOnce . "profile" "Profile" -}}
{{- end -}}
{{- $user := false -}}
{{- $email := false -}}
{{- if eq $profile "personal" -}}
{{- $user = "ymo" -}}
{{- $email = "yuri.moens@gmail.com" -}}
{{- else if eq $profile "sfpd" -}}
{{- $user = "moyur" -}}
{{- $email = "yuri.moens@sfpd.fgov.be" -}}
{{- end -}}
encryption = "gpg"
[gpg]
recipient = "yuri.moens@gmail.com"
[data]
profile = "{{ $profile }}"
user = "{{ $user }}"
email = {{ $email | quote }}