diff --git a/home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.tmpl b/home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.tmpl index 20583a40..789e0c51 100644 --- a/home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_before_91-configure-gpg.tmpl @@ -32,8 +32,8 @@ if [ -n "$KEYID" ] && command -v gpg > /dev/null; then gpgconf --kill dirmngr KEYID="${KEYID^^}" KEYID="$(echo "$KEYID" | sed 's/^0X/0x/')" - if [ -f "$HOME/.gnupg/$KEYID.key" ]; then - gpg --import "$HOME/.gnupg/$KEYID.key" + if [ -f "$HOME/.gnupg/public/$KEYID.key" ]; then + gpg --import "$HOME/.gnupg/public/$KEYID.key" fi else logg success 'Successfully imported configured public user GPG key'