at 17.09-beta 821 B view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5{ 6 7 ###### interface 8 9 options = { 10 11 services.rpcbind = { 12 13 enable = mkOption { 14 type = types.bool; 15 default = false; 16 description = '' 17 Whether to enable `rpcbind', an ONC RPC directory service 18 notably used by NFS and NIS, and which can be queried 19 using the rpcinfo(1) command. `rpcbind` is a replacement for 20 `portmap`. 21 ''; 22 }; 23 24 }; 25 26 }; 27 28 29 ###### implementation 30 31 config = mkIf config.services.rpcbind.enable { 32 environment.systemPackages = [ pkgs.rpcbind ]; 33 34 systemd.packages = [ pkgs.rpcbind ]; 35 36 systemd.services.rpcbind = { 37 wantedBy = [ "multi-user.target" ]; 38 }; 39 40 users.extraUsers.rpc = { 41 group = "nogroup"; 42 uid = config.ids.uids.rpc; 43 }; 44 }; 45 46}