summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/zsh-user.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2015-12-16 11:40:48 +0100
committermakefu <github@syntax-fehler.de>2015-12-16 11:40:48 +0100
commitcf033f051a14e90e7526fee0d63eef86ba3c75fc (patch)
treef3cd17207bb8f14354fca1d3e6cf25948cbf366a /makefu/2configs/zsh-user.nix
parentc20d38e11ecf38dda8931769a04cdcdf96f88c3f (diff)
m 2 zsh-user: load gpg-agent, obsoletes oh-my-zsh ssh plugin
Diffstat (limited to 'makefu/2configs/zsh-user.nix')
-rw-r--r--makefu/2configs/zsh-user.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/makefu/2configs/zsh-user.nix b/makefu/2configs/zsh-user.nix
index 266ce256..1b176241 100644
--- a/makefu/2configs/zsh-user.nix
+++ b/makefu/2configs/zsh-user.nix
@@ -22,6 +22,16 @@ in
autoload -U compinit && compinit
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
'';
promptInit = ''