diff --git a/home/.chezmoi.yaml.tmpl b/home/.chezmoi.yaml.tmpl index 01e8dc8..12286e0 100644 --- a/home/.chezmoi.yaml.tmpl +++ b/home/.chezmoi.yaml.tmpl @@ -1,5 +1,14 @@ -{{- $email := promptStringOnce . "email" "Email address" }} -{{- $mbsyncAccountNumber := promptIntOnce . "mbsyncAccountNumber" "How many mbsync accounts would you generate" }} +{{- $email := promptStringOnce . "email" "Email address " }} +{{- $mbsyncAccountNumber := promptIntOnce . "mbsyncAccountNumber" "How many mbsync accounts would you generate " }} + +{{- if $mbsyncAccountNumber gt 0 }} + {{- range $i, $e := until $mbsyncAccountNumber -}} + {{- $mbsyncAccountName := promptStringOnce . "mbsync.name" "MbSync account name " }} + {{- $mbsyncAccountMail := promptStringOnce . "mbsync.mail" "MbSync account mail " }} + {{- $mbsyncAccountUser := promptStringOnce . "mbsync.user" "MbSync account user " }} + {{- $mbsyncAccountHost := promptStringOnce . "mbsync.host" "MbSync account host " }} + {{- end -}} +{{- end -}} data: email: {{ $email | quote }}