From d113086f8e4236c64084d71579af945dcccf5cc1 Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Tue, 26 Dec 2023 20:35:35 -0500 Subject: [PATCH] Update chezmoi config and using toml --- .chezmoi.toml.tmpl | 48 +++++++++++++++++++++++++++++++++------------- .chezmoidata.toml | 0 2 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 .chezmoidata.toml diff --git a/.chezmoi.toml.tmpl b/.chezmoi.toml.tmpl index ed97bc1..f2de2bc 100644 --- a/.chezmoi.toml.tmpl +++ b/.chezmoi.toml.tmpl @@ -1,23 +1,45 @@ -{{- $gitname := promptStringOnce . "gitname" "Git Name" -}} -{{- $gitmail := promptStringOnce . "gitmail" "Git Mail Address" -}} +{{ $personal := promptBoolOnce . "personal" "Is this a personal computer" -}} +{{ $choicestype := list "desktop" "server" -}} -{{- $osid := chezmoi.os -}} -{{- if .chezmoi.osRelease -}} -{{- if hasKey .chezmoi.osRelease "id" -}} -{{- $osid = printf "%s-%s" .chezmoi.os .chezmoi.osRelease.id -}} -{{- end -}} -{{- end -}} +{{ $hosttype := promptChoiceOnce . "hosttype" "What type of host are you on" $choicestype -}} -pager = "less -R" -encryption = "age" +{{ $email := "psi-jack@linux-help.org" -}} +{{ $work := false -}} +{{ if ne $personal true -}} +{{ $email := promptStringOnce . "email" "What is your email" -}} +{{ $work := promptBoolOnce . "work" "Is this for work" -}} +{{ end -}} + +{{ $osid := .chezmoi.os -}} +{{ if .chezmoi.osRelease -}} +{{ if hasKey .chezmoi.osRelease "id" -}} +{{ $osid = printf "%s-%s" .chezmoi.os .chezmoi.osRelease.id -}} +{{ end -}} +{{ end -}} [data] - gitname = {{ $gitname | quote }} - gitmail = {{ $gitmail | quote }} + name = "Eric Renfro" + email = {{ $email | quote }} osid = {{ $osid | quote }} + personal = {{ $personal }} + work = {{ $work }} + hosttype = {{ $hosttype | quote }} + +[programs] + terminal = "alacritty" + editor = "micro" + visual = "less" + pager = "less -R" + browser = "firefox" + +[font] + [[term]] + name = "Hack Nerd Font" + size = 12.0 + [age] - identity = ~"~/.config/sops/keys.txt" + identity = "~/.config/sops/keys.txt" recipient = "age1fc7myuewzdr7rvqr9fl3x3jwky3j4gp92hxguf3dlgnesm9s9e8q45xmp2" [git] diff --git a/.chezmoidata.toml b/.chezmoidata.toml new file mode 100644 index 0000000..e69de29