1{
2 config,
3 lib,
4 pkgs,
5 ...
6}:
7
8with lib;
9
10{
11
12 ###### interface
13
14 options = {
15
16 services.oidentd.enable = mkOption {
17 default = false;
18 type = types.bool;
19 description = ''
20 Whether to enable ‘oidentd’, an implementation of the Ident
21 protocol (RFC 1413). It allows remote systems to identify the
22 name of the user associated with a TCP connection.
23 '';
24 };
25
26 };
27
28 ###### implementation
29
30 config = mkIf config.services.oidentd.enable {
31 systemd.services.oidentd = {
32 after = [ "network.target" ];
33 wantedBy = [ "multi-user.target" ];
34 serviceConfig.Type = "forking";
35 script = "${pkgs.oidentd}/sbin/oidentd -u oidentd -g nogroup";
36 };
37
38 users.users.oidentd = {
39 description = "Ident Protocol daemon user";
40 group = "oidentd";
41 uid = config.ids.uids.oidentd;
42 };
43
44 users.groups.oidentd.gid = config.ids.gids.oidentd;
45
46 };
47
48}