mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 05:05:29 +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
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
environment.interactiveShellInit = optionalString config.services.xserver.enable
|
environment.variables.SSH_ASKPASS = optionalString config.services.xserver.enable askPassword;
|
||||||
''
|
|
||||||
export SSH_ASKPASS=${askPassword}
|
|
||||||
'';
|
|
||||||
|
|
||||||
programs.ssh.askPassword = mkDefault "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
|
programs.ssh.askPassword = mkDefault "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue