* Start the SSH agent on X11 login.
svn path=/nixos/trunk/; revision=8531
This commit is contained in:
parent
3e71bd9731
commit
e312a8ef64
|
@ -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"];
|
name = ["services" "httpd" "enable"];
|
||||||
default = false;
|
default = false;
|
||||||
|
|
|
@ -134,7 +134,8 @@ import ../upstart-jobs/gather.nix {
|
||||||
(import ../upstart-jobs/xserver.nix {
|
(import ../upstart-jobs/xserver.nix {
|
||||||
inherit config;
|
inherit config;
|
||||||
inherit (pkgs) stdenv writeText lib xterm slim xorg mesa
|
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;};
|
fontDirectories = import ../system/fonts.nix {inherit pkgs;};
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
, compiz, feh
|
, compiz, feh
|
||||||
, kdelibs, kdebase
|
, kdelibs, kdebase
|
||||||
, xkeyboard_config
|
, xkeyboard_config
|
||||||
|
, openssh, x11_ssh_askpass
|
||||||
|
|
||||||
, config
|
, config
|
||||||
|
|
||||||
|
@ -89,12 +90,19 @@ let
|
||||||
exec > $HOME/.Xerrors 2>&1
|
exec > $HOME/.Xerrors 2>&1
|
||||||
|
|
||||||
|
|
||||||
# Load X defaults.
|
### Load X defaults.
|
||||||
if test -e ~/.Xdefaults; then
|
if test -e ~/.Xdefaults; then
|
||||||
${xorg.xrdb}/bin/xrdb -merge ~/.Xdefaults
|
${xorg.xrdb}/bin/xrdb -merge ~/.Xdefaults
|
||||||
fi
|
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.
|
### Start a window manager.
|
||||||
|
|
||||||
${if windowManager == "twm" then "
|
${if windowManager == "twm" then "
|
||||||
|
|
Loading…
Reference in a new issue