1 { config, lib, pkgs, ... }: with lib; let
2 cfg = config.services.nullidentdmod;
5 options.services.nullidentdmod = with types; {
6 enable = mkEnableOption (lib.mdDoc "the nullidentdmod identd daemon");
10 description = lib.mdDoc "User ID to return. Set to null to return a random string each time.";
16 config = mkIf cfg.enable {
17 systemd.sockets.nullidentdmod = {
18 description = "Socket for identd (NullidentdMod)";
19 listenStreams = [ "113" ];
20 socketConfig.Accept = true;
21 wantedBy = [ "sockets.target" ];
24 systemd.services."nullidentdmod@" = {
25 description = "NullidentdMod service";
28 ExecStart = "${pkgs.nullidentdmod}/bin/nullidentdmod${optionalString (cfg.userid != null) " ${cfg.userid}"}";
29 StandardInput = "socket";
30 StandardOutput = "socket";