2020-04-24 23:36:52 +00:00
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
|
|
services.oidentd.enable = mkOption {
|
|
|
|
|
default = false;
|
|
|
|
|
type = types.bool;
|
2022-08-12 12:06:08 +00:00
|
|
|
|
description = lib.mdDoc ''
|
2020-04-24 23:36:52 +00: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.
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
|
|
|
|
|
config = mkIf config.services.oidentd.enable {
|
|
|
|
|
systemd.services.oidentd = {
|
|
|
|
|
after = [ "network.target" ];
|
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
|
serviceConfig.Type = "forking";
|
|
|
|
|
script = "${pkgs.oidentd}/sbin/oidentd -u oidentd -g nogroup";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
users.users.oidentd = {
|
|
|
|
|
description = "Ident Protocol daemon user";
|
|
|
|
|
group = "oidentd";
|
|
|
|
|
uid = config.ids.uids.oidentd;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
users.groups.oidentd.gid = config.ids.gids.oidentd;
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|