diff options
-rw-r--r-- | .config/git/config##template (renamed from .config/git/config) | 12 | ||||
-rwxr-xr-x | .local/share/bin/gpg-git | 5 | ||||
-rw-r--r-- | .profile | 5 |
3 files changed, 17 insertions, 5 deletions
diff --git a/.config/git/config b/.config/git/config##template index a6b0949..09efdff 100644 --- a/.config/git/config +++ b/.config/git/config##template @@ -1,7 +1,13 @@ +[init] + defaultBranch = master [user] email = loek@pipeframe.xyz name = lonkaars - signingkey = 1081FFE2B963ADB5BDCF4DA6D0E3BC76E355B6CC + signingkey = {{ env.GPG_ID_GIT }} +[commit] + gpgsign = true +[gpg] + program = {{ env.XDG_DATA_HOME }}/bin/gpg-git [credential] helper = cache --timeout 7200 helper = store @@ -23,7 +29,3 @@ pl = pull l = log d = diff -[init] - defaultBranch = master -[commit] - gpgsign = true diff --git a/.local/share/bin/gpg-git b/.local/share/bin/gpg-git new file mode 100755 index 0000000..281b793 --- /dev/null +++ b/.local/share/bin/gpg-git @@ -0,0 +1,5 @@ +#!/bin/sh +GPG_KEY_ID="$GPG_ID_GIT" # see ~/.profile +GPG_KEY_PASSPHRASE="$(pass "gpg/$GPG_KEY_ID.asc" | head -n1)" +echo "gpg $*" >> ~/gpg-git.txt +gpg --batch --no-tty --pinentry-mode loopback --passphrase "$GPG_KEY_PASSPHRASE" "$@" @@ -92,6 +92,11 @@ export DOTNET_CLI_TELEMETRY_OPTOUT=1 export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=$XDG_CONFIG_HOME/java -Dawt.useSystemAAFontSettings=on -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" export _JAVA_AWT_WM_NONREPARENTING=1 +# GPG key IDs +export GPG_ID_DEFAULT="1081FFE2B963ADB5BDCF4DA6D0E3BC76E355B6CC" +export GPG_ID_GIT="$GPG_ID_DEFAULT" +export GPG_ID_PASSWORD_STORE="A12ADDD26335FA960FE3C78A9FC7A0100BC4C971" + # secrets [ -f "$HOME/.env" ] && . "$HOME/.env" |