]> git.friedersdorff.com Git - max/saltfiles.git/commitdiff
Fuck gpg-agent directly
authorMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 25 Oct 2022 09:55:36 +0000 (10:55 +0100)
committerMaximilian Friedersdorff <max@friedersdorff.com>
Tue, 25 Oct 2022 09:55:36 +0000 (10:55 +0100)
states/zsh/arch.sls
states/zsh/files/zshrc

index 84051dfea5e56fc06553edd8d76404e077e3ed4c..5b576264448d19f5ab71beeb1eb4d698e7d0b2b0 100644 (file)
@@ -4,3 +4,4 @@ install zsh:
       - zsh
       - zsh-completions
       - python-virtualenvwrapper
+      - keychain
index 57c58ec874b7ef601b65ccb439096c6aa588a872..22f0b6542f644dc89e8348558b46882fa8ab7387 100644 (file)
@@ -50,18 +50,7 @@ precmd () {
        __git_ps1 "" "$(virtual_env)${p}" "${NEWLINE}[%s]${NEWLINE}"
 }
 
-
-if ! pgrep -x -u "${USER}" gpg-agent >/dev/null 2>&1; then
-  gpg-connect-agent /bye >/dev/null 2>&1
-fi
-
-unset SSH_AGENT_PID
-if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
-  export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
-fi
-
-
-gpg-connect-agent updatestartuptty /bye > /dev/null
+eval $(keychain --agents gpg,ssh --eval --quiet --noask id_ed25519 B3030EB2 F0C471E6)
 
 bindkey '^R' history-incremental-search-backward