From 104bbed8c090fd5e3497db11e7c2687c0dd92c13 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Mon, 4 Mar 2024 13:30:21 +0100 Subject: [PATCH] Up. --- home/.chezmoi.toml.tmpl | 20 ++++++++++++++++++++ home/.chezmoi.yaml.tmpl | 19 ------------------- 2 files changed, 20 insertions(+), 19 deletions(-) create mode 100644 home/.chezmoi.toml.tmpl delete mode 100644 home/.chezmoi.yaml.tmpl 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 -}}