mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
cf16b3acfe
svn path=/nixos/trunk/; revision=11140
35 lines
588 B
Nix
35 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
|
|
'';
|
|
|
|
}
|