1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 07:00:43 +00:00

* Use the moduli file. This shuts up the "WARNING: /etc/ssh/moduli

does not exist, using fixed modulus" message in /var/log/messages.

svn path=/nixos/trunk/; revision=19754
This commit is contained in:
Eelco Dolstra 2010-02-01 17:05:02 +00:00
parent 86b42fdfbf
commit 051e9342b3

View file

@ -1,8 +1,9 @@
{pkgs, config, ...}:
{ config, pkgs, ... }:
with pkgs.lib;
let
inherit (pkgs.lib) mkOption mkIf;
inherit (pkgs) openssh;
cfg = config.services.sshd;
@ -15,7 +16,7 @@ let
UsePAM yes
${ pkgs.lib.concatMapStrings (port : ''Port ${toString port}
${ concatMapStrings (port : ''Port ${toString port}
'') cfg.ports}
${if cfg.forwardX11 then "
@ -112,13 +113,18 @@ in
config = mkIf config.services.sshd.enable {
users.extraUsers = pkgs.lib.singleton
users.extraUsers = singleton
{ name = "sshd";
uid = config.ids.uids.sshd;
description = "SSH privilege separation user";
home = "/var/empty";
};
environment.etc = singleton
{ source = "${openssh}/etc/ssh/moduli";
target = "ssh/moduli";
};
jobs.sshd = {
description = "OpenSSH server";
@ -141,7 +147,7 @@ in
exec = "${openssh}/sbin/sshd -h /etc/ssh/ssh_host_dsa_key -f ${sshdConfig}";
};
networking.firewall.allowedTCPPorts = cfg.ports ;
networking.firewall.allowedTCPPorts = cfg.ports;
};