summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2016-07-21 02:04:45 +0200
committermakefu <github@syntax-fehler.de>2016-07-21 02:04:45 +0200
commit964062c8071b7b069ec6a2661a3530629a95a1c2 (patch)
treeeb8aef246fc0a8fcb707584eb2357536e8a36878
parent123f1f4b6b39f1e2f8397399c2d94f828c9c4966 (diff)
m 2 zsh-user: use gpg-agent 2.1 style daemon
-rw-r--r--makefu/2configs/zsh-user.nix14
1 files changed, 5 insertions, 9 deletions
diff --git a/makefu/2configs/zsh-user.nix b/makefu/2configs/zsh-user.nix
index 9527ead1a..99c1315e1 100644
--- a/makefu/2configs/zsh-user.nix
+++ b/makefu/2configs/zsh-user.nix
@@ -22,15 +22,11 @@ in
bindkey "\e[3~" delete-char
zstyle ':completion:*' menu select
- # load gpg-agent
- envfile="$HOME/.gnupg/gpg-agent.env"
- if [ -e "$envfile" ] && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then
- eval "$(cat "$envfile")"
- else
- eval "$(${pkgs.gnupg}/bin/gpg-agent --daemon --enable-ssh-support --write-env-file "$envfile")"
- fi
- export GPG_AGENT_INFO
- export SSH_AUTH_SOCK
+ gpg-connect-agent updatestartuptty /bye >/dev/null
+ GPG_TTY=$(tty)
+ export GPG_TTY
+ unset SSH_AGENT_PID
+ export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
'';
promptInit = ''