2014-04-14 15:26:48 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
2012-03-21 20:37:37 +00:00
|
|
|
|
2014-04-14 15:26:48 +01: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 16:04:07 +01:00
|
|
|
config = mkIf config.services.rpcbind.enable {
|
2012-10-24 17:10:58 +01: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
|
|
|
|
2018-06-30 00:58:35 +01:00
|
|
|
users.users.rpc = {
|
2017-01-29 17:06:17 +00:00
|
|
|
group = "nogroup";
|
|
|
|
uid = config.ids.uids.rpc;
|
|
|
|
};
|
2013-09-26 16:04:07 +01:00
|
|
|
};
|
2012-03-21 20:37:37 +00:00
|
|
|
|
|
|
|
}
|