aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/dot_config/git/config.tmpl14
-rw-r--r--home/dot_config/pam-gnupg.tmpl4
-rw-r--r--home/dot_local/share/bin/home/dot_local/share/bin/executable_gpg-git.tmpl (renamed from home/dot_local/share/bin/executable_gpg-git)4
-rw-r--r--home/dot_profile9
-rw-r--r--readme.md11
5 files changed, 27 insertions, 15 deletions
diff --git a/home/dot_config/git/config.tmpl b/home/dot_config/git/config.tmpl
index 9202c61..f83efeb 100644
--- a/home/dot_config/git/config.tmpl
+++ b/home/dot_config/git/config.tmpl
@@ -1,15 +1,21 @@
[init]
- defaultBranch = master
+ defaultBranch = {{ dig "git" "default_branch" "master" . }}
[core]
quotepath = off
[user]
- email = loek@pipeframe.xyz
- name = Loek Le Blansch
- signingkey = {{ env "GPG_ID_GIT" }}
+ {{- with (dig "git" "email" nil .) }}
+ email = {{ . }}
+ {{- end }}
+ {{- with (dig "git" "name" nil .) }}
+ name = {{ . }}
+ {{- end }}
+ {{- with (dig "git" "gpg_id" nil .) }}
+ signingkey = {{ . }}
[commit]
gpgsign = true
[gpg]
program = {{ env "XDG_DATA_HOME" }}/bin/gpg-git
+ {{- end }}
[credential]
helper = cache --timeout 7200
helper = store
diff --git a/home/dot_config/pam-gnupg.tmpl b/home/dot_config/pam-gnupg.tmpl
index 710dc91..f0e3870 100644
--- a/home/dot_config/pam-gnupg.tmpl
+++ b/home/dot_config/pam-gnupg.tmpl
@@ -1,2 +1,4 @@
{{ env "GNUPGHOME" }}
-D8D22B94C13557BF2B5A0DCF4AF5A972E2FAF84F
+{{- if hasKey . "pam_gnupg" }}
+{{ join "\n" .pam_gnupg }}
+{{- end }}
diff --git a/home/dot_local/share/bin/executable_gpg-git b/home/dot_local/share/bin/home/dot_local/share/bin/executable_gpg-git.tmpl
index df0feca..8d9e600 100644
--- a/home/dot_local/share/bin/executable_gpg-git
+++ b/home/dot_local/share/bin/home/dot_local/share/bin/executable_gpg-git.tmpl
@@ -1,4 +1,6 @@
#!/bin/sh
-GPG_KEY_ID="$GPG_ID_GIT" # see ~/.profile
+{{- with ( dig "git" "gpg_id" nil . ) }}
+GPG_KEY_ID="{{ . }}"
GPG_KEY_PASSPHRASE="$(pass "gpg/$GPG_KEY_ID.asc" | head -n1)"
gpg --batch --no-tty --pinentry-mode loopback --passphrase "$GPG_KEY_PASSPHRASE" "$@"
+{{- end }}
diff --git a/home/dot_profile b/home/dot_profile
index caf94f9..c5d8663 100644
--- a/home/dot_profile
+++ b/home/dot_profile
@@ -113,15 +113,6 @@ alias diffstat='diffstat -C'
# disable dotnet telemetry
export DOTNET_CLI_TELEMETRY_OPTOUT=1
-# GPG key IDs
-export GPG_ID_DEFAULT="1081FFE2B963ADB5BDCF4DA6D0E3BC76E355B6CC"
-export GPG_ID_GIT="$GPG_ID_DEFAULT"
-export GPG_ID_PASSWORD_STORE="A12ADDD26335FA960FE3C78A9FC7A0100BC4C971"
-
-# GDB
-! [ -d "$XDG_DATA_HOME/gdb" ] && mkdir -p "$XDG_DATA_HOME/gdb"
-export GDBHISTFILE="$XDG_DATA_HOME/gdb/history"
-
# GDB
! [ -d "$XDG_DATA_HOME/gdb" ] && mkdir -p "$XDG_DATA_HOME/gdb"
export GDBHISTFILE="$XDG_DATA_HOME/gdb/history"
diff --git a/readme.md b/readme.md
index 0a5db03..a1827b6 100644
--- a/readme.md
+++ b/readme.md
@@ -17,4 +17,15 @@ data:
host: <bool>
# base directory to use for playlists/pid/db files
base_dir: <path>
+ git:
+ # git commit email
+ email: <string>
+ # git commit name
+ name: <string>
+ # git default branch (master)
+ default_branch: <string>
+ # commit signing gpg key id
+ gpg_id: <keyid>
+ # list of keygrips to unlock on login using pam-gnupg
+ pam_gnupg: <list[str]>
```