Skip to content

Commit 051e8ca

Browse files
authored
gui: setup ssh agent and askpass on login (#361)
specifically, this adds support for using a fido ssh key that requires a pin on a remote ssh server via agent forwarding.
1 parent 5061311 commit 051e8ca

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

modules/gui/default.nix

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,16 @@ in
112112
"xdg/kitty/no-preference-theme.auto.conf".source = "${kittyThemes}/rose-pine.conf";
113113
};
114114

115-
# Conflict override since multiple DEs set this option
116-
programs.ssh.askPassword = pkgs.lib.mkForce (lib.getExe pkgs.ksshaskpass.out);
115+
programs.ssh = {
116+
# setup ssh agent with askpass on login by default
117+
# if you want to forward a fido ssh key that requires a pin, the ssh agent
118+
# needs askpass to prompt for the pin when the agent uses the key.
119+
startAgent = true;
120+
enableAskPassword = true;
121+
122+
# Conflict override since multiple DEs set this option
123+
askPassword = pkgs.lib.mkForce (lib.getExe pkgs.kdePackages.ksshaskpass);
124+
};
117125

118126
xdg.portal = {
119127
enable = true;

0 commit comments

Comments
 (0)