From 6fab11675ed1fbe3825245ae156a161c8fabfe9b Mon Sep 17 00:00:00 2001 From: void Date: Wed, 28 Jun 2023 22:50:40 +0300 Subject: [PATCH] Config template --- .chezmoi.toml.tmpl | 7 +++++++ README.md | 9 --------- dot_gitconfig.tmpl | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) create mode 100644 .chezmoi.toml.tmpl delete mode 100644 README.md diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl new file mode 100644 index 0000000..0589237 --- /dev/null +++ b/.chezmoi.toml.tmpl @@ -0,0 +1,7 @@ +{{- $email := promptStringOnce . "email" "Email address" -}} +{{- $username := promptStringOnce . "username" "Username" -}} + +[data] +username = {{ $username | quote }} +email = {{ $email | quote }} + diff --git a/README.md b/README.md deleted file mode 100644 index d7780ee..0000000 --- a/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Конфиг-файл для machine-specific настроек - -Файл: `~/.config/chezmoi/chezmoi.toml` - -```toml -[data] -username = "" -``` - diff --git a/dot_gitconfig.tmpl b/dot_gitconfig.tmpl index c4c75dd..672a17d 100644 --- a/dot_gitconfig.tmpl +++ b/dot_gitconfig.tmpl @@ -1,6 +1,6 @@ [user] - name = {{ dig "username" "void" . }} - email = void.sp@gmail.com + name = {{ .username }} + email = {{ .email }} [push] default = simple [commit]