From ea02ee5f0c6a977ba18d457175c23774690cfc38 Mon Sep 17 00:00:00 2001 From: Elizabeth Date: Wed, 28 May 2025 23:02:02 -0700 Subject: Working dotfiles! --- zsh/.config/zsh/setup/gpg.zsh | 23 ----------------------- zsh/.config/zsh/setup/gpg.zsh.j2 | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 23 deletions(-) delete mode 100755 zsh/.config/zsh/setup/gpg.zsh create mode 100755 zsh/.config/zsh/setup/gpg.zsh.j2 (limited to 'zsh') diff --git a/zsh/.config/zsh/setup/gpg.zsh b/zsh/.config/zsh/setup/gpg.zsh deleted file mode 100755 index 171b9d8..0000000 --- a/zsh/.config/zsh/setup/gpg.zsh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/zsh - - -# -- -- -KEY_ID="DC4323D1738F27358793D6E87BB52F7036FA7C18" -gpg -k "$KEY_ID" >/dev/null 2>&1 || gpg --import "$HOME/Documents/pubkey" - -cp $HOME/scripts/pinentry.sh /tmp/pinentry - - -export PINENTRY_USER_DATA="${PINENTRY_USER_DATA:-PINENTRY_USE_TTY}" -if [ "$SSH_CLIENT" ]; then - export PINENTRY_USER_DATA=PINENTRY_USE_CURSES - exit 0 -fi - -# yubikey! -unset SSH_AGENT_PID -export GPG_TTY=$(tty) -export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) -gpgconf --launch gpg-agent -gpg-connect-agent updatestartuptty /bye > /dev/null -# -- -- diff --git a/zsh/.config/zsh/setup/gpg.zsh.j2 b/zsh/.config/zsh/setup/gpg.zsh.j2 new file mode 100755 index 0000000..4ffb38f --- /dev/null +++ b/zsh/.config/zsh/setup/gpg.zsh.j2 @@ -0,0 +1,23 @@ +#!/bin/zsh + + +# -- -- +KEY_ID="{{ pgp.id }}" +gpg -k "$KEY_ID" >/dev/null 2>&1 || gpg --import "$HOME/.pubkey" + +cp $HOME/scripts/pinentry.sh /tmp/pinentry + + +export PINENTRY_USER_DATA="${PINENTRY_USER_DATA:-PINENTRY_USE_TTY}" +if [ "$SSH_CLIENT" ]; then + export PINENTRY_USER_DATA=PINENTRY_USE_CURSES + exit 0 +fi + +# yubikey! +unset SSH_AGENT_PID +export GPG_TTY=$(tty) +export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) +gpgconf --launch gpg-agent +gpg-connect-agent updatestartuptty /bye > /dev/null +# -- -- -- cgit v1.2.3-70-g09d2