mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-20 17:29:39 +01:00
https://github.com/nix-community/home-manager/pull/7117#issuecomment-3018582819 noted that #7117 broke compatibility with forwarding ssh-agents using `ssh -A`/`ForwardAgent`. In order to continue supporting the fix for the issue raised in #5997 and address the compatibility problem mentioned by @euank, this commit introduces the solution described in https://github.com/nix-community/home-manager/pull/7117#issuecomment-3025001779. The code now checks the following: 1. is this shell part of an SSH connection and is `SSH_AUTH_SOCK` set? if so, assume the socket variable was set by sshd to point at a forwarded socket; bail out to skip setting `SSH_AUTH_SOCK". 1. is the current process a child of `gpg-agent --daemon`? if so, then bail out to skip setting `SSH_AUTH_SOCK`. 1. if we got this far, then set `SSH_AUTH_SOCK`. I've tested this fix locally and can confirm that both #5997 as well as the regression are fixed. Signed-off-by: squat <lserven@gmail.com> |
||
|---|---|---|
| .. | ||
| accounts | ||
| config | ||
| files | ||
| i18n/input-method | ||
| launchd | ||
| lib | ||
| lib-bash | ||
| misc | ||
| po | ||
| programs | ||
| services | ||
| targets | ||
| dbus.nix | ||
| default.nix | ||
| files.nix | ||
| home-environment.nix | ||
| manual.nix | ||
| modules.nix | ||
| systemd-activate.sh | ||
| systemd.nix | ||
| wayland.nix | ||
| xresources.nix | ||
| xsession.nix | ||