summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Roelli <charles@aurox.ch>2026-01-28 13:45:49 +0100
committerCharles Roelli <charles@aurox.ch>2026-01-28 13:45:49 +0100
commit8eb601b4fe457c153270e391287af7cab1067c49 (patch)
treef2f0017304065e2eea8d76fcd29a1e28f4ae8303
parent23bc58609ccf52e5fe255b98c03da88df5fe30bd (diff)
Set up gpg-agent in .bashrc
I could not get the gpg-agent of home-gpg-agent-service-type to recognize a YubiKey, which failed with: scdaemon[19539]: pcsc_establish_context failed: service stopped (0x8010001e) Let's use the commands from here instead: https://github.com/drduh/YubiKey-Guide?tab=readme-ov-file#replace-agents gpg is installed system-wide, not in Guix.
-rw-r--r--.bashrc5
1 files changed, 5 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
index b488fcc..0b5444d 100644
--- a/.bashrc
+++ b/.bashrc
@@ -115,3 +115,8 @@ if ! shopt -oq posix; then
. /etc/bash_completion
fi
fi
+
+export GPG_TTY=$(tty)
+export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
+gpgconf --launch gpg-agent
+gpg-connect-agent updatestartuptty /bye > /dev/null