2014-04-14 14:26:48 +00:00
|
|
|
|
{ config, lib, pkgs, ... }:
|
2011-11-10 23:06:24 +00:00
|
|
|
|
|
2014-04-14 14:26:48 +00:00
|
|
|
|
with lib;
|
2011-11-10 23:06:24 +00:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
|
|
services.oidentd.enable = mkOption {
|
|
|
|
|
default = false;
|
|
|
|
|
type = types.bool;
|
|
|
|
|
description = ''
|
|
|
|
|
Whether to enable ‘oidentd’, an implementation of the Ident
|
|
|
|
|
protocol (RFC 1413). It allows remote systems to identify the
|
|
|
|
|
name of the user associated with a TCP connection.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
|
|
config = mkIf config.services.oidentd.enable {
|
|
|
|
|
|
|
|
|
|
jobs.oidentd =
|
|
|
|
|
{ startOn = "started network-interfaces";
|
|
|
|
|
daemonType = "fork";
|
2015-08-18 05:10:48 +00:00
|
|
|
|
exec = "${pkgs.oidentd}/sbin/oidentd -u oidentd -g nogroup" +
|
|
|
|
|
optionalString config.networking.enableIPv6 " -a ::"
|
|
|
|
|
;
|
2011-11-10 23:06:24 +00:00
|
|
|
|
};
|
|
|
|
|
|
2013-08-26 13:20:25 +00:00
|
|
|
|
users.extraUsers.oidentd = {
|
|
|
|
|
description = "Ident Protocol daemon user";
|
|
|
|
|
group = "oidentd";
|
|
|
|
|
uid = config.ids.uids.oidentd;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
users.extraGroups.oidentd.gid = config.ids.gids.oidentd;
|
2011-11-10 23:06:24 +00:00
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|