Fixes for gpg-agent

This commit is contained in:
Marko Korhonen 2021-10-06 21:26:24 +03:00
parent 77c42375ca
commit 36d7871256
5 changed files with 13 additions and 14 deletions

View file

@ -22,9 +22,6 @@ setopt EXTENDED_HISTORY
# Enable completions for aliases
setopt complete_aliases
# Use exa completions for ls
compdef ls='exa'
# Variable to pass to sdotdrop to get current user
export USRNAME=$USER
@ -62,11 +59,10 @@ export MANPAGER="nvim +Man!"
# Use GPG for SSH authentication
export GPG_TTY="$(tty)"
# Fix for pinentry not working for ssh
gpg-connect-agent updatestartuptty /bye >/dev/null
# set SSH_AUTH_SOCK if not logging in over SSH
if [ "$SSH_CONNECTION" -eq "" ]; then
if [ "$SSH_CONNECTION" = "" ]; then
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent
#gpgconf --launch gpg-agent
gpg-connect-agent updatestartuptty /bye >/dev/null
fi

View file

@ -24,6 +24,7 @@ _fzf_compgen_path() {
# Modern replacements for cat and ls
alias cat='bat --paging=never'
alias ls='exa'
compdef ls='exa'
{%@@ if profile != "mko-laptop" @@%}
# Command not found handler

2
home/.pam_environment Normal file
View file

@ -0,0 +1,2 @@
SSH_AGENT_PID DEFAULT=
SSH_AUTH_SOCK DEFAULT="${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh"