* Generate /etc/ssh/ssh_config, set ForwardX11 and XAuthLocation.
svn path=/nixos/trunk/; revision=10177
This commit is contained in:
parent
d69cc82771
commit
622734b58b
@ -21,6 +21,7 @@ rec {
|
|||||||
|
|
||||||
sshd = {
|
sshd = {
|
||||||
enable = false;
|
enable = false;
|
||||||
|
forwardX11 = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
xserver = {
|
xserver = {
|
||||||
|
@ -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.
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user