From 86aff11de7edf77d0aa69e9f211325162a6fed0b Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Sun, 11 Feb 2024 21:22:38 +0100 Subject: use ssh-agent --- profiles/core/home.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/profiles/core/home.nix b/profiles/core/home.nix index cd9b7b5..7ad543e 100644 --- a/profiles/core/home.nix +++ b/profiles/core/home.nix @@ -129,8 +129,14 @@ [[ -f ~/.nix-profile/etc/profile.d/nix.sh ]] && . ~/.nix-profile/etc/profile.d/nix.sh export COLORTERM=truecolor export GPG_TTY="$(tty)" - export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) gpgconf --launch gpg-agent + + if [ ! -S ~/.ssh/ssh_auth_sock ]; then + eval `ssh-agent` + ln -sf "$SSH_AUTH_SOCK" ~/.ssh/ssh_auth_sock + fi + export SSH_AUTH_SOCK=~/.ssh/ssh_auth_sock + ssh-add -l > /dev/null || ssh-add ''; shellAliases = { k9s = "k9s "; @@ -183,7 +189,7 @@ }; services.gpg-agent = { enable = !machine.isDarwin; - enableSshSupport = true; + enableSshSupport = false; defaultCacheTtl = 34550000; maxCacheTtl = 34550000; pinentryFlavor = "gtk2"; -- cgit v1.2.3