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
@ -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…
x
Reference in New Issue
Block a user