* Start the SSH agent on X11 login.

svn path=/nixos/trunk/; revision=8531
This commit is contained in:
Eelco Dolstra 2007-04-02 15:01:09 +00:00
parent 3e71bd9731
commit e312a8ef64
3 changed files with 23 additions and 2 deletions

View file

@ -569,6 +569,18 @@
}
{
name = ["services" "xserver" "startSSHAgent"];
default = true;
description = "
Whether to start the SSH agent when you log in. The SSH agent
remembers private keys for you so that you don't have to type in
passphrases every time you make an SSH connection. Use
<command>ssh-add</command> to add a key to the agent.
";
}
{
name = ["services" "httpd" "enable"];
default = false;

View file

@ -134,7 +134,8 @@ import ../upstart-jobs/gather.nix {
(import ../upstart-jobs/xserver.nix {
inherit config;
inherit (pkgs) stdenv writeText lib xterm slim xorg mesa
gnome compiz feh kdebase kdelibs xkeyboard_config;
gnome compiz feh kdebase kdelibs xkeyboard_config
openssh x11_ssh_askpass;
fontDirectories = import ../system/fonts.nix {inherit pkgs;};
})

View file

@ -2,6 +2,7 @@
, compiz, feh
, kdelibs, kdebase
, xkeyboard_config
, openssh, x11_ssh_askpass
, config
@ -89,10 +90,17 @@ let
exec > $HOME/.Xerrors 2>&1
# Load X defaults.
### Load X defaults.
if test -e ~/.Xdefaults; then
${xorg.xrdb}/bin/xrdb -merge ~/.Xdefaults
fi
${if getCfg "startSSHAgent" then "
### Start the SSH agent.
export SSH_ASKPASS=${x11_ssh_askpass}/libexec/x11-ssh-askpass
eval $(${openssh}/bin/ssh-agent)
" else ""}
### Start a window manager.