2014-04-14 16:26:48 +02:00
|
|
|
|
{ config, lib, pkgs, ... }:
|
2011-11-11 00:06:24 +01:00
|
|
|
|
|
2014-04-14 16:26:48 +02:00
|
|
|
|
with lib;
|
2011-11-11 00:06:24 +01:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
|
|
services.oidentd.enable = mkOption {
|
|
|
|
|
default = false;
|
|
|
|
|
type = types.bool;
|
2022-07-28 23:19:15 +02:00
|
|
|
|
description = lib.mdDoc ''
|
2011-11-11 00:06:24 +01:00
|
|
|
|
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.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
2016-01-06 07:50:18 +01:00
|
|
|
|
|
2011-11-11 00:06:24 +01:00
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
|
|
config = mkIf config.services.oidentd.enable {
|
2016-01-06 07:50:18 +01:00
|
|
|
|
systemd.services.oidentd = {
|
2016-09-10 20:17:04 +02:00
|
|
|
|
after = [ "network.target" ];
|
2016-01-06 07:50:18 +01:00
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
|
serviceConfig.Type = "forking";
|
2018-11-02 07:13:17 +01:00
|
|
|
|
script = "${pkgs.oidentd}/sbin/oidentd -u oidentd -g nogroup";
|
2016-01-06 07:50:18 +01:00
|
|
|
|
};
|
2011-11-11 00:06:24 +01:00
|
|
|
|
|
2018-06-30 01:58:35 +02:00
|
|
|
|
users.users.oidentd = {
|
2013-08-26 15:20:25 +02:00
|
|
|
|
description = "Ident Protocol daemon user";
|
|
|
|
|
group = "oidentd";
|
|
|
|
|
uid = config.ids.uids.oidentd;
|
|
|
|
|
};
|
|
|
|
|
|
2018-06-30 01:58:35 +02:00
|
|
|
|
users.groups.oidentd.gid = config.ids.gids.oidentd;
|
2011-11-11 00:06:24 +01:00
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|