2014-04-14 14:26:48 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
2012-03-21 20:37:37 +00:00
|
|
|
|
2014-04-14 14:26:48 +00:00
|
|
|
with lib;
|
2012-03-21 20:37:37 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.rpcbind = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
2013-10-30 16:37:45 +00:00
|
|
|
type = types.bool;
|
2012-03-21 20:37:37 +00:00
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Whether to enable `rpcbind', an ONC RPC directory service
|
|
|
|
notably used by NFS and NIS, and which can be queried
|
|
|
|
using the rpcinfo(1) command. `rpcbind` is a replacement for
|
|
|
|
`portmap`.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
###### implementation
|
|
|
|
|
2013-09-26 15:04:07 +00:00
|
|
|
config = mkIf config.services.rpcbind.enable {
|
2012-10-24 16:10:58 +00:00
|
|
|
environment.systemPackages = [ pkgs.rpcbind ];
|
2012-03-21 20:37:37 +00:00
|
|
|
|
2017-01-29 17:06:17 +00:00
|
|
|
systemd.packages = [ pkgs.rpcbind ];
|
2012-03-21 20:37:37 +00:00
|
|
|
|
2017-01-29 17:06:17 +00:00
|
|
|
systemd.services.rpcbind = {
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
};
|
2012-03-21 20:37:37 +00:00
|
|
|
|
2017-01-29 17:06:17 +00:00
|
|
|
users.extraUsers.rpc = {
|
|
|
|
group = "nogroup";
|
|
|
|
uid = config.ids.uids.rpc;
|
|
|
|
};
|
2013-09-26 15:04:07 +00:00
|
|
|
};
|
2012-03-21 20:37:37 +00:00
|
|
|
|
|
|
|
}
|