rpcbind service: use upstream systemd unit
This commit is contained in:
parent
314f187b0a
commit
876a6d7f03
@ -286,6 +286,7 @@
|
||||
gogs = 268;
|
||||
pdns-recursor = 269;
|
||||
kresd = 270;
|
||||
rpc = 271;
|
||||
|
||||
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
||||
|
||||
@ -541,6 +542,7 @@
|
||||
couchpotato = 267;
|
||||
gogs = 268;
|
||||
kresd = 270;
|
||||
#rpc = 271; # unused
|
||||
|
||||
# When adding a gid, make sure it doesn't match an existing
|
||||
# uid. Users and groups with the same name should have equal
|
||||
|
@ -2,35 +2,6 @@
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
netconfigFile = {
|
||||
target = "netconfig";
|
||||
source = pkgs.writeText "netconfig" ''
|
||||
#
|
||||
# The network configuration file. This file is currently only used in
|
||||
# conjunction with the TI-RPC code in the libtirpc library.
|
||||
#
|
||||
# Entries consist of:
|
||||
#
|
||||
# <network_id> <semantics> <flags> <protofamily> <protoname> \
|
||||
# <device> <nametoaddr_libs>
|
||||
#
|
||||
# The <device> and <nametoaddr_libs> fields are always empty in this
|
||||
# implementation.
|
||||
#
|
||||
udp tpi_clts v inet udp - -
|
||||
tcp tpi_cots_ord v inet tcp - -
|
||||
udp6 tpi_clts v inet6 udp - -
|
||||
tcp6 tpi_cots_ord v inet6 tcp - -
|
||||
rawip tpi_raw - inet - - -
|
||||
local tpi_cots_ord - loopback - - -
|
||||
unix tpi_cots_ord - loopback - - -
|
||||
'';
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
###### interface
|
||||
@ -58,25 +29,18 @@ in
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.rpcbind.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.rpcbind ];
|
||||
|
||||
environment.etc = [ netconfigFile ];
|
||||
systemd.packages = [ pkgs.rpcbind ];
|
||||
|
||||
systemd.services.rpcbind =
|
||||
{ description = "ONC RPC Directory Service";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
|
||||
requires = [ "basic.target" ];
|
||||
after = [ "basic.target" ];
|
||||
|
||||
unitConfig.DefaultDependencies = false; # don't stop during shutdown
|
||||
|
||||
serviceConfig.Type = "forking";
|
||||
serviceConfig.ExecStart = "@${pkgs.rpcbind}/bin/rpcbind rpcbind";
|
||||
};
|
||||
systemd.services.rpcbind = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
||||
users.extraUsers.rpc = {
|
||||
group = "nogroup";
|
||||
uid = config.ids.uids.rpc;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user