diff --git a/home/.chezmoi.toml.tmpl b/home/.chezmoi.toml.tmpl new file mode 100644 index 0000000..b845f15 --- /dev/null +++ b/home/.chezmoi.toml.tmpl @@ -0,0 +1,20 @@ +{{- $email := promptStringOnce . "email" "Email address " }} +{{- $mbsyncAccountNumber := promptIntOnce . "mbsyncAccountNumber" "How many mbsync accounts would you generate " }} + +{{- $mbsyncAccountNumber = $mbsyncAccountNumber | int -}} + + +[data] +email = {{ $email | quote }} +mbsyncAccountNumber = {{ $mbsyncAccountNumber }} + +{{- if gt $mbsyncAccountNumber 0 -}} + {{- range $i, $e := until $mbsyncAccountNumber -}} + {{ $mbsyncAccountName := promptString "MbSync account name " }} +[[data.mbsync]] +name = {{ $mbsyncAccountName | quote }} +email = "accountEmail" +username = "accountUserName" +server = "accountServer" + {{- end -}} +{{- end -}} diff --git a/home/.chezmoi.yaml.tmpl b/home/.chezmoi.yaml.tmpl deleted file mode 100644 index b2e1f73..0000000 --- a/home/.chezmoi.yaml.tmpl +++ /dev/null @@ -1,19 +0,0 @@ -{{- $email := promptStringOnce . "email" "Email address " }} -{{- $mbsyncAccountNumber := promptIntOnce . "mbsyncAccountNumber" "How many mbsync accounts would you generate " }} - -{{- $mbsyncAccountNumber = $mbsyncAccountNumber | int -}} - - -data: - email: {{ $email | quote }} - mbsyncAccountNumber: {{ $mbsyncAccountNumber }} - {{- if gt $mbsyncAccountNumber 0 -}} - mbsync: - {{- range $i, $e := until $mbsyncAccountNumber -}} - {{ $mbsyncAccountName := promptString "MbSync account name " }} - - name: {{ $mbsyncAccountName }} - email: "accountEmail" - username: "accountUserName" - server: "accountServer" - {{- end -}} - {{- end -}}