mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 06:31:02 +00:00
47 lines
816 B
Nix
47 lines
816 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
services.rpcbind = {
|
|
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
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
|
|
|
|
config = mkIf config.services.rpcbind.enable {
|
|
environment.systemPackages = [ pkgs.rpcbind ];
|
|
|
|
systemd.packages = [ pkgs.rpcbind ];
|
|
|
|
systemd.services.rpcbind = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
};
|
|
|
|
users.users.rpc = {
|
|
group = "nogroup";
|
|
uid = config.ids.uids.rpc;
|
|
};
|
|
};
|
|
|
|
}
|