at v206 966 B view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5{ 6 7 ###### interface 8 9 options = { 10 11 services.oidentd.enable = mkOption { 12 default = false; 13 type = types.bool; 14 description = '' 15 Whether to enable oidentd, an implementation of the Ident 16 protocol (RFC 1413). It allows remote systems to identify the 17 name of the user associated with a TCP connection. 18 ''; 19 }; 20 21 }; 22 23 24 ###### implementation 25 26 config = mkIf config.services.oidentd.enable { 27 28 jobs.oidentd = 29 { startOn = "started network-interfaces"; 30 daemonType = "fork"; 31 exec = "${pkgs.oidentd}/sbin/oidentd -u oidentd -g nogroup" + 32 optionalString config.networking.enableIPv6 " -a ::" 33 ; 34 }; 35 36 users.extraUsers.oidentd = { 37 description = "Ident Protocol daemon user"; 38 group = "oidentd"; 39 uid = config.ids.uids.oidentd; 40 }; 41 42 users.extraGroups.oidentd.gid = config.ids.gids.oidentd; 43 44 }; 45 46}