From f636b53432411230ab34145384cf3d7e0857f8b7 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 29 Sep 2022 10:18:11 -0500 Subject: [PATCH] use chezmoi templates to generalize the dots --- home/.chezmoi.toml.tmpl | 12 ++++++++++++ home/.chezmoiignore | 2 +- home/private_dot_config/git/{config => config.tmpl} | 6 +++--- 3 files changed, 16 insertions(+), 4 deletions(-) rename home/private_dot_config/git/{config => config.tmpl} (89%) diff --git a/home/.chezmoi.toml.tmpl b/home/.chezmoi.toml.tmpl index 96340be..c011b89 100644 --- a/home/.chezmoi.toml.tmpl +++ b/home/.chezmoi.toml.tmpl @@ -1 +1,13 @@ sourceDir = "~/.dotfiles" + +[diff] +command = 'delta' + +{{ $email := promptString "git email" -}} +{{ $name := promptString "git name" -}} +{{ $gui := promptBool "use gui configs?" -}} +[data] +email = {{ $email | quote }} +name = {{ $name | quote }} +gui = {{ $gui }} + diff --git a/home/.chezmoiignore b/home/.chezmoiignore index d6e4d92..9b12f1a 100644 --- a/home/.chezmoiignore +++ b/home/.chezmoiignore @@ -1,4 +1,4 @@ -{{- if ne .chezmoi.hostname "thinkpad" }} +{{- if (not .gui) }} bin/get-updates bin/lock .xinitrc diff --git a/home/private_dot_config/git/config b/home/private_dot_config/git/config.tmpl similarity index 89% rename from home/private_dot_config/git/config rename to home/private_dot_config/git/config.tmpl index 238dcfe..9f18953 100644 --- a/home/private_dot_config/git/config +++ b/home/private_dot_config/git/config.tmpl @@ -1,10 +1,10 @@ [credential] helper = cache [core] - excludesfile = /home/daylin/.config/git/ignore + excludesfile = /home/{{- .chezmoi.username -}}/.config/git/ignore [user] - name = Daylin Morgan - email = daylinmorgan@gmail.com + name = {{ .name }} + email = {{ .email }} [submodule] recurse = true [pull]