1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

gpg-agent: use gpgconf to set SSH socket path

Inspired by #163.
This commit is contained in:
Robert Helgesson 2018-01-14 15:55:51 +01:00
parent b8b595c6b2
commit 576217d33a
No known key found for this signature in database
GPG key ID: C3DB11069E65DC86

View file

@ -89,7 +89,10 @@ in
home.sessionVariables =
optionalAttrs cfg.enableSshSupport {
SSH_AUTH_SOCK = "\${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh";
SSH_AUTH_SOCK =
if config.home.sessionVariableSetter == "pam"
then "\${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh"
else "$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)";
};
programs.bash.initExtra = gpgInitStr;