2014-04-14 16:26:48 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
2012-03-21 21:37:37 +01:00
|
|
|
|
2014-04-14 16:26:48 +02:00
|
|
|
with lib;
|
2012-03-21 21:37:37 +01:00
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
|
|
|
|
options = {
|
|
|
|
|
|
|
|
services.rpcbind = {
|
|
|
|
|
|
|
|
enable = mkOption {
|
2013-10-30 17:37:45 +01:00
|
|
|
type = types.bool;
|
2012-03-21 21:37:37 +01: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 17:04:07 +02:00
|
|
|
config = mkIf config.services.rpcbind.enable {
|
2012-10-24 18:10:58 +02:00
|
|
|
environment.systemPackages = [ pkgs.rpcbind ];
|
2012-03-21 21:37:37 +01:00
|
|
|
|
2017-01-29 18:06:17 +01:00
|
|
|
systemd.packages = [ pkgs.rpcbind ];
|
2012-03-21 21:37:37 +01:00
|
|
|
|
2017-01-29 18:06:17 +01:00
|
|
|
systemd.services.rpcbind = {
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
};
|
2012-03-21 21:37:37 +01:00
|
|
|
|
2017-01-29 18:06:17 +01:00
|
|
|
users.extraUsers.rpc = {
|
|
|
|
group = "nogroup";
|
|
|
|
uid = config.ids.uids.rpc;
|
|
|
|
};
|
2013-09-26 17:04:07 +02:00
|
|
|
};
|
2012-03-21 21:37:37 +01:00
|
|
|
|
|
|
|
}
|