3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/services/networking/oidentd.nix

46 lines
995 B
Nix
Raw Normal View History

{ config, lib, pkgs, ... }:
with lib;
{
###### interface
options = {
services.oidentd.enable = mkOption {
default = false;
type = types.bool;
description = ''
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 06:50:18 +00:00
###### implementation
config = mkIf config.services.oidentd.enable {
2016-01-06 06:50:18 +00:00
systemd.services.oidentd = {
after = [ "network.target" ];
2016-01-06 06:50:18 +00:00
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "forking";
script = "${pkgs.oidentd}/sbin/oidentd -u oidentd -g nogroup" +
optionalString config.networking.enableIPv6 " -a ::";
};
users.users.oidentd = {
2013-08-26 14:20:25 +01:00
description = "Ident Protocol daemon user";
group = "oidentd";
uid = config.ids.uids.oidentd;
};
users.groups.oidentd.gid = config.ids.gids.oidentd;
};
}