fix: fix SSH_AUTH_SOCK value

Otherwise SSH keys from GPG aren't picked up.
This commit is contained in:
Felix Schröter 2022-03-30 00:04:35 +02:00
parent 4df7f5a400
commit e7e6285bc3
Signed by: felschr
GPG key ID: 671E39E6744C807D
3 changed files with 9 additions and 12 deletions

View file

@ -19,10 +19,9 @@
defaultCacheTtlSsh = 600;
pinentryFlavor = "curses";
};
# https://github.com/nix-community/home-manager/issues/667#issuecomment-902236379
# https://github.com/nix-community/home-manager/pull/2253
home.sessionVariables.SSH_AUTH_SOCK =
"$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh";
programs.zsh.initExtra = ''
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh
'';
programs.git.defaultProfile = "private";

View file

@ -24,10 +24,9 @@ with pkgs; {
defaultCacheTtlSsh = 600;
pinentryFlavor = "gnome3";
};
# https://github.com/nix-community/home-manager/issues/667#issuecomment-902236379
# https://github.com/nix-community/home-manager/pull/2253
home.sessionVariables.SSH_AUTH_SOCK =
"$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh";
programs.zsh.initExtra = ''
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh
'';
programs.ssh.enable = true;

View file

@ -30,10 +30,9 @@
defaultCacheTtlSsh = 600;
pinentryFlavor = "gnome3";
};
# https://github.com/nix-community/home-manager/issues/667#issuecomment-902236379
# https://github.com/nix-community/home-manager/pull/2253
home.sessionVariables.SSH_AUTH_SOCK =
"$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh";
programs.zsh.initExtra = ''
export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh
'';
programs.ssh.enable = true;