Use GPG agent for SSH also
This commit is contained in:
@@ -45,14 +45,6 @@ export ACPI_LID_NAME=LID
|
||||
|
||||
umask 0022
|
||||
|
||||
# Start the gpg-agent if not already running
|
||||
if ! pgrep -x --uid "${USER}" gpg-agent >/dev/null 2>&1; then
|
||||
eval $(gpg-agent --daemon --sh)
|
||||
fi
|
||||
|
||||
# because gpg-agent is somehow broken for ssh, use the usual ssh-agent
|
||||
eval $(ssh-agent -s)
|
||||
|
||||
# exec startx breaks some logind fuckery, without exec it works
|
||||
if [[ -z $DISPLAY ]] ; then
|
||||
if (( $XDG_VTNR == 1 )) ; then
|
||||
|
||||
@@ -4,13 +4,7 @@ _zshdir="$HOME/.zshrc.d"
|
||||
|
||||
{% if machine.gpg_agent %}
|
||||
export GPG_TTY=$(tty)
|
||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||
{% endif %}
|
||||
|
||||
{% if machine.ssh_agent %}
|
||||
if $(ssh-add -l 2>/dev/null | grep -q "no identities") ; then
|
||||
ssh-add
|
||||
fi
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
{% endif %}
|
||||
|
||||
for file in "${_zshdir}"/* ; do
|
||||
|
||||
Reference in New Issue
Block a user