mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
Since PR #8099, the module sets `$SSH_AUTH_SOCK` through shells' options
for interactive shell initialization instead of
`home.sessionVariablesExtra`. The replacement was not faithful, however,
since `home.sessionVariablesExtra` is sourced also in non-interactive
shells. With this commit, the shells' profile options (where
`home.sessionVariablesExtra` is sourced) are used to set
`$SSH_AUTH_SOCK`.
Fixes #8129.
(cherry picked from commit 89c9508bbe)
15 lines
294 B
Nix
15 lines
294 B
Nix
{
|
|
services.ssh-agent = {
|
|
enable = true;
|
|
enableBashIntegration = true;
|
|
};
|
|
|
|
programs.bash.enable = true;
|
|
|
|
nmt.script = ''
|
|
assertFileContains \
|
|
home-files/.profile \
|
|
'export SSH_AUTH_SOCK=$(@getconf-system_cmds@/bin/getconf DARWIN_USER_TEMP_DIR)/ssh-agent'
|
|
'';
|
|
}
|