{{- $hostname := .chezmoi.hostname -}}
{{- if eq .chezmoi.os "darwin" -}}
{{-  $hostname := output "scutil" "--get" "ComputerName" | trim -}}
{{- end -}}

{{- $choices := list "wsl" "devterm" "personal" "work" -}}
{{- $hosttype := promptChoiceOnce . "hosttype" "What type of host are you on" $choices -}}

{{ $name := promptString "name" -}}
{{ $email_personal := promptString "email_personal" -}}
{{ $email_work := promptString "email_work" -}}
{{ $github_personal := promptString "github_personal" -}}
{{ $github_work := promptString "github_work" -}}

encryption = "age"
[age]
    identity = "~/.key.txt"
    recipient = "age1yd87u4ae86erpem2tynyl959ppc8a3jt4ztssykytzaklut6uvus5prt2t"
[data]
    hostname = {{ $hostname | quote }}
    hosttype = {{ $hosttype | quote }}
    name = {{ $name | quote }}
    email_personal = {{ $email_personal | quote }}
    email_work = {{ $email_work | quote }}
    github_personal = {{ $github_personal | quote }}
    github_work = {{ $github_work | quote }}