* Generate /etc/ssh/ssh_config, set ForwardX11 and XAuthLocation.

svn path=/nixos/trunk/; revision=10177
This commit is contained in:
Eelco Dolstra 2008-01-16 13:59:03 +00:00
parent d69cc82771
commit 622734b58b
3 changed files with 17 additions and 2 deletions

View File

@ -21,6 +21,7 @@ rec {
sshd = { sshd = {
enable = false; enable = false;
forwardX11 = false;
}; };
xserver = { xserver = {

View File

@ -133,6 +133,19 @@ import ../helpers/make-etc.nix {
target = "nix.conf"; # will be symlinked from /nix/etc/nix/nix.conf in activate-configuration.sh. target = "nix.conf"; # will be symlinked from /nix/etc/nix/nix.conf in activate-configuration.sh.
} }
{ # SSH configuration. Slight duplication of the sshd_config
# generation in the sshd service.
source = pkgs.writeText "ssh_config" ''
${if config.services.sshd.forwardX11 then ''
ForwardX11 yes
XAuthLocation ${pkgs.xorg.xauth}/bin/xauth
'' else ''
ForwardX11 no
''}
'';
target = "ssh/ssh_config";
}
] ]
# Configuration for ssmtp. # Configuration for ssmtp.

View File

@ -5,7 +5,8 @@
let let
sshdConfig = writeText "sshd_config" " sshdConfig = writeText "sshd_config" ''
UsePAM yes UsePAM yes
${if forwardX11 then " ${if forwardX11 then "
@ -20,7 +21,7 @@ let
" else " " else "
"} "}
"; '';
sshdUid = (import ../system/ids.nix).uids.sshd; sshdUid = (import ../system/ids.nix).uids.sshd;