Skip to content

Commit 7eff362

Browse files
nixos/ssh: inline askPassword
1 parent 4a29096 commit 7eff362

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

nixos/modules/programs/ssh.nix

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ let
88

99
cfg = config.programs.ssh;
1010

11-
askPassword = cfg.askPassword;
12-
1311
askPasswordWrapper = pkgs.writeScript "ssh-askpass-wrapper"
1412
''
1513
#! ${pkgs.runtimeShell} -e
1614
export DISPLAY="$(systemctl --user show-environment | ${pkgs.gnused}/bin/sed 's/^DISPLAY=\(.*\)/\1/; t; d')"
1715
export WAYLAND_DISPLAY="$(systemctl --user show-environment | ${pkgs.gnused}/bin/sed 's/^WAYLAND_DISPLAY=\(.*\)/\1/; t; d')"
18-
exec ${askPassword} "$@"
16+
exec ${cfg.askPassword} "$@"
1917
'';
2018

2119
knownHosts = attrValues cfg.knownHosts;
@@ -351,7 +349,7 @@ in
351349
fi
352350
'';
353351

354-
environment.variables.SSH_ASKPASS = optionalString cfg.enableAskPassword askPassword;
352+
environment.variables.SSH_ASKPASS = optionalString cfg.enableAskPassword cfg.askPassword;
355353

356354
};
357355
}

0 commit comments

Comments
 (0)