From 0b9b2d73993309409b8809c9abd39381a1545139 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Wed, 20 Nov 2024 19:34:19 -0500 Subject: [PATCH] git: use ssh signatures --- src/.chezmoi.toml.tmpl | 4 ++++ src/dot_config/git/config | 9 --------- src/dot_config/git/config.tmpl | 12 ++++++++++++ 3 files changed, 16 insertions(+), 9 deletions(-) delete mode 100644 src/dot_config/git/config create mode 100644 src/dot_config/git/config.tmpl diff --git a/src/.chezmoi.toml.tmpl b/src/.chezmoi.toml.tmpl index e382f50..1c38197 100644 --- a/src/.chezmoi.toml.tmpl +++ b/src/.chezmoi.toml.tmpl @@ -1,6 +1,10 @@ {{- $systemprofilechoices := list "DEFAULT" "SLIM" "MINIMAL" -}} {{- $systemprofile := promptChoiceOnce . "systemprofile" "Select a system profile (use capital letter)" $systemprofilechoices "MINIMAL" -}} +{{- $email := promptStringOnce . "email" "Email address for Git" -}} +{{- $fullname := promptStringOnce . "email" "Full name for Git" -}} [data] systemprofile = {{ $systemprofile | quote }} +email = {{ $email | quote }} +fullname = {{ $fullname | quote }} opacity = "0.7" diff --git a/src/dot_config/git/config b/src/dot_config/git/config deleted file mode 100644 index 0a89364..0000000 --- a/src/dot_config/git/config +++ /dev/null @@ -1,9 +0,0 @@ -[user] - email = dogeystamp@disroot.org - name = dogeystamp -[gpg] - program = passphrase2pgp -[merge] - tool = nvimmerge -[mergetool "nvimmerge"] - cmd = "nvim -d -c \"wincmd l\" -c \"norm ]c\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\"" diff --git a/src/dot_config/git/config.tmpl b/src/dot_config/git/config.tmpl new file mode 100644 index 0000000..b3b7dbf --- /dev/null +++ b/src/dot_config/git/config.tmpl @@ -0,0 +1,12 @@ +[user] + email = {{ .email }} + name = {{ .fullname }} + signingkey = "~/.ssh/keys/sign.pub" +[gpg] + format = ssh +[gpg.ssh] + allowedSignersFile = "~/.ssh/allowed_signers" +[merge] + tool = nvimmerge +[mergetool "nvimmerge"] + cmd = "nvim -d -c \"wincmd l\" -c \"norm ]c\" \"$LOCAL\" \"$MERGED\" \"$REMOTE\""