Unverified Commit 7eff362c authored by Sandro Jäckel's avatar Sandro Jäckel
Browse files

nixos/ssh: inline askPassword

parent 4a290960
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -8,14 +8,12 @@ let

  cfg  = config.programs.ssh;

  askPassword = cfg.askPassword;

  askPasswordWrapper = pkgs.writeScript "ssh-askpass-wrapper"
    ''
      #! ${pkgs.runtimeShell} -e
      export DISPLAY="$(systemctl --user show-environment | ${pkgs.gnused}/bin/sed 's/^DISPLAY=\(.*\)/\1/; t; d')"
      export WAYLAND_DISPLAY="$(systemctl --user show-environment | ${pkgs.gnused}/bin/sed 's/^WAYLAND_DISPLAY=\(.*\)/\1/; t; d')"
      exec ${askPassword} "$@"
      exec ${cfg.askPassword} "$@"
    '';

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

    environment.variables.SSH_ASKPASS = optionalString cfg.enableAskPassword askPassword;
    environment.variables.SSH_ASKPASS = optionalString cfg.enableAskPassword cfg.askPassword;

  };
}