summary refs log tree commit diff
path: root/nixos/modules/programs/ssh.nix
diff options
context:
space:
mode:
authorThomas Tuegel <ttuegel@gmail.com>2015-03-11 10:59:02 -0500
committerThomas Tuegel <ttuegel@gmail.com>2015-03-11 11:49:29 -0500
commit4b109071524766c53910481cfb1894cbfcd366f4 (patch)
treeee9302a78ddb8f1fd3811cc902ca1a24f2a0d0da /nixos/modules/programs/ssh.nix
parent5b5b7aa951dd371cd8ee1a88997ede0c3c17cb10 (diff)
downloadnixpkgs-4b109071524766c53910481cfb1894cbfcd366f4.tar
nixpkgs-4b109071524766c53910481cfb1894cbfcd366f4.tar.gz
nixpkgs-4b109071524766c53910481cfb1894cbfcd366f4.tar.bz2
nixpkgs-4b109071524766c53910481cfb1894cbfcd366f4.tar.lz
nixpkgs-4b109071524766c53910481cfb1894cbfcd366f4.tar.xz
nixpkgs-4b109071524766c53910481cfb1894cbfcd366f4.tar.zst
nixpkgs-4b109071524766c53910481cfb1894cbfcd366f4.zip
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.
Diffstat (limited to 'nixos/modules/programs/ssh.nix')
-rw-r--r--nixos/modules/programs/ssh.nix8
1 files changed, 7 insertions, 1 deletions
diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix
index bd9b897158d..6ca73eea5f6 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;