about summary refs log tree commit diff
path: root/configs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-03-13T12·17+0000
committerWilliam Carroll <wpcarro@gmail.com>2020-03-13T12·17+0000
commit4509fb5e50ec71749c7d1df7cca20652b689e820 (patch)
treecadbf5a624e64abf224512865f0a993c9f0589e5 /configs
parent3c73f735175da8449712a2a4ccda5663cb1813c4 (diff)
Restore ssh-agent initialize in ~/.profile
For two days I tried using gpg-agent to emulate ssh-agent, but it did not work
the same way as ssh-agent. For example, gcert stopped working. Also, when I
tried adding keys to ~/.gnupg/sshcontrol using `ssh-add ~/.ssh/id_rsa`, the
command failed.

While the concept of reusing gpg-agent for ssh-agent appeals to me...
- Fewer agent processes
- pinentry support
...in practice, it fell short of my expectations. Some or all of this may be
because I tried running this on a gLinux machine.
Diffstat (limited to 'configs')
-rw-r--r--configs/.profile6
1 files changed, 6 insertions, 0 deletions
diff --git a/configs/.profile b/configs/.profile
index 2237bb144513..fef9ef814e49 100644
--- a/configs/.profile
+++ b/configs/.profile
@@ -8,6 +8,12 @@ if [ -z "$DISPLAY" -a "$(tty)" = '/dev/tty5' ]; then
   exec xinit -- vt05
 fi
 
+# I tried configuring home-manager to generate the ssh-agent init code (i.e. the
+# code below), but it seems that the home-manager community support using
+# gpg-agent to emulate the ssh-agent. I tried that, but I didn't fully
+# understand the benefits.
+eval "$(ssh-agent -s)"
+
 # This fixes nixpkgs that rely on glibc-2.27, which allegedly breaks locale
 # issues.
 # See this thread for more details: https://github.com/NixOS/nixpkgs/issues/8398