sshd: change location of config file (#41744)

create symlink /etc/ssh/sshd_config
This commit is contained in:
Izorkin 2018-06-10 02:39:06 +03:00 committed by xeji
parent 91be6b9f40
commit 9ef30fd56a

View File

@ -334,7 +334,9 @@ in
services.openssh.moduliFile = mkDefault "${cfgc.package}/etc/ssh/moduli";
environment.etc = authKeysFiles //
{ "ssh/moduli".source = cfg.moduliFile; };
{ "ssh/moduli".source = cfg.moduliFile;
"ssh/sshd_config".text = cfg.extraConfig;
};
systemd =
let
@ -365,7 +367,7 @@ in
{ ExecStart =
(optionalString cfg.startWhenNeeded "-") +
"${cfgc.package}/bin/sshd " + (optionalString cfg.startWhenNeeded "-i ") +
"-f ${pkgs.writeText "sshd_config" cfg.extraConfig}";
"-f /etc/ssh/sshd_config";
KillMode = "process";
} // (if cfg.startWhenNeeded then {
StandardInput = "socket";