2007-08-08 20:42:25 +00:00
|
|
|
{config, pkgs}:
|
|
|
|
let
|
2007-11-09 18:49:45 +00:00
|
|
|
cfg = config.services.ircdHybrid;
|
2007-08-08 20:42:25 +00:00
|
|
|
ircdService = import ../services/ircd-hybrid {
|
|
|
|
stdenv = pkgs.stdenvNewSetupScript;
|
|
|
|
inherit (pkgs) ircdHybrid coreutils
|
2007-08-13 10:45:16 +00:00
|
|
|
su iproute gnugrep procps;
|
2007-11-09 18:49:45 +00:00
|
|
|
serverName = cfg.serverName;
|
|
|
|
sid = cfg.sid;
|
|
|
|
description = cfg.description;
|
|
|
|
rsaKey = cfg.rsaKey;
|
|
|
|
certificate = cfg.certificate;
|
|
|
|
adminEmail = cfg.adminEmail;
|
|
|
|
extraIPs = cfg.extraIPs;
|
|
|
|
extraPort = cfg.extraPort;
|
|
|
|
gw6cEnabled = config.services.gw6c.enable;
|
2007-08-08 20:42:25 +00:00
|
|
|
};
|
|
|
|
|
2007-11-09 18:49:45 +00:00
|
|
|
startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
|
2007-08-08 20:42:25 +00:00
|
|
|
|
|
|
|
in
|
|
|
|
{
|
|
|
|
name = "ircd-hybrid";
|
|
|
|
users = [ {
|
|
|
|
name = "ircd";
|
|
|
|
description = "IRCD owner.";
|
|
|
|
} ];
|
|
|
|
groups = [{name = "ircd";}];
|
|
|
|
job = "
|
|
|
|
description = \"IRCD Hybrid server.\"
|
|
|
|
|
|
|
|
start on ${startingDependency}/started
|
|
|
|
stop on ${startingDependency}/stop
|
|
|
|
|
|
|
|
respawn ${ircdService}/bin/control start
|
|
|
|
";
|
|
|
|
}
|