From 4b109071524766c53910481cfb1894cbfcd366f4 Mon Sep 17 00:00:00 2001 From: Thomas Tuegel Date: Wed, 11 Mar 2015 10:59:02 -0500 Subject: [PATCH] ssh: make askPassword an option By making askPassword an option, desktop environment modules can override the default x11_ssh_askpassword with their own equivalent for better integration. For example, KDE 5 uses plasma5.ksshaskpass instead. --- nixos/modules/programs/ssh.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix index bd9b897158dc..6ca73eea5f6f 100644 --- a/nixos/modules/programs/ssh.nix +++ b/nixos/modules/programs/ssh.nix @@ -9,7 +9,7 @@ let cfg = config.programs.ssh; cfgd = config.services.openssh; - askPassword = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass"; + askPassword = cfg.askPassword; askPasswordWrapper = pkgs.writeScript "ssh-askpass-wrapper" '' @@ -26,6 +26,12 @@ in programs.ssh = { + askPassword = mkOption { + type = types.string; + default = "${pkgs.x11_ssh_askpass}/libexec/x11-ssh-askpass"; + description = ''Program used by SSH to ask for passwords.''; + }; + forwardX11 = mkOption { type = types.bool; default = false;