mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
nixos-ssh: set SSH_ASKPASS globally and not just on interactive shells
If we limit SSH_ASKPASS to interactive shells, users are unable to trigger the ssh-passphrase dialog from their desktop environment autostart scripts. Usecase: I call ssh-add during my desktop environment autostart and want to have the passphrase dialog immediately after startup. For this to work, SSH_ASKPASS needs to be propagated properly on non-interactive shells.
This commit is contained in:
parent
e8cc9204a8
commit
312bae7fc0
1 changed files with 1 additions and 4 deletions
|
@ -221,10 +221,7 @@ in
|
|||
fi
|
||||
'';
|
||||
|
||||
environment.interactiveShellInit = optionalString config.services.xserver.enable
|
||||
''
|
||||
export SSH_ASKPASS=${askPassword}
|
||||
'';
|
||||
environment.variables.SSH_ASKPASS = optionalString config.services.xserver.enable askPassword;
|
||||
|
||||
programs.ssh.askPassword = mkDefault "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue