1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-20 17:29:39 +01:00
home-manager/modules
Lucas Servén Marín 1fa73bb2cc
fix(service/gpg-agent): allow SSH ForwardAgent compatibility (#7355)
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>
2025-07-03 08:24:16 -05:00
..
accounts treewide: implement auto importing for modules 2025-06-22 23:58:37 -05:00
config home-cursor: sway depend on cfg.size instead of gtk.cursorTheme.size (#7176) 2025-05-31 19:31:59 -05:00
files files: show better error when file would be clobbered (#7348) 2025-06-30 21:16:25 -05:00
i18n/input-method fcitx5: ensure config doesn't get overwritten (#6940) 2025-04-30 14:19:29 -05:00
launchd treewide: lnl7 -> nix-darwin 2025-05-16 18:47:17 -05:00
lib maintainers: fix incorrect entries (#7360) 2025-07-01 23:01:12 -05:00
lib-bash home-manager: move profile management 2025-01-03 11:22:59 +01:00
misc quickshell: add module (#7316) 2025-06-29 18:28:19 -05:00
po Translations update from Hosted Weblate (#7244) 2025-06-09 22:29:31 -05:00
programs zed-editor: survive if previous files are not JSON5 (#7351) 2025-07-03 07:44:20 -05:00
services fix(service/gpg-agent): allow SSH ForwardAgent compatibility (#7355) 2025-07-03 08:24:16 -05:00
targets targets/darwin: fix ShowDate default description (#7256) 2025-06-12 20:46:23 -05:00
dbus.nix dbus: Create with pacakges options (#7064) 2025-05-15 12:59:12 -05:00
default.nix treewide: reformat nixfmt-rfc-style 2025-04-08 08:50:05 -07:00
files.nix files: add home.file.<name>.ignorelinks 2025-05-11 18:53:40 -05:00
home-environment.nix home-environment: add home.extraDependencies 2025-05-02 11:11:28 +02:00
manual.nix treewide: reformat nixfmt-rfc-style 2025-04-08 08:50:05 -07:00
modules.nix modules: allow root level nix files 2025-06-23 16:20:26 -05:00
systemd-activate.sh systemd: don't try to restart templates 2024-06-26 18:14:48 +02:00
systemd.nix treewide: remove unused code (#6985) 2025-05-07 10:03:21 -05:00
wayland.nix wayland: create tray.target if xsession is not enabled (#6332) 2025-02-06 22:50:03 +01:00
xresources.nix treewide: reformat nixfmt-rfc-style 2025-04-08 08:50:05 -07:00
xsession.nix xsession: add xdg-desktop-autostart to requires of hm-graphical-session (#7108) 2025-05-28 22:39:21 -05:00