mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-30 01:23:03 +00:00
cf16b3acfe
svn path=/nixos/trunk/; revision=11140
36 lines
588 B
Nix
36 lines
588 B
Nix
{ makePortmap }:
|
|
|
|
let uid = (import ../system/ids.nix).uids.portmap;
|
|
gid = (import ../system/ids.nix).gids.portmap;
|
|
in
|
|
{
|
|
name = "portmap";
|
|
|
|
users = [
|
|
{ name = "portmap";
|
|
inherit uid;
|
|
description = "portmap daemon user";
|
|
home = "/var/empty";
|
|
}
|
|
];
|
|
|
|
groups = [
|
|
{ name = "portmap";
|
|
inherit gid;
|
|
}
|
|
];
|
|
|
|
job =
|
|
let portmap = makePortmap { daemonUID = uid; daemonGID = gid; };
|
|
in
|
|
''
|
|
description "ONC RPC portmap"
|
|
|
|
start on network-interfaces/started
|
|
stop on network-interfaces/stop
|
|
|
|
respawn ${portmap}/sbin/portmap
|
|
'';
|
|
|
|
}
|