Add `portmap' job.
svn path=/nixos/trunk/; revision=11140
This commit is contained in:
parent
5229399617
commit
cf16b3acfe
@ -12,6 +12,7 @@
|
||||
ftp = 8;
|
||||
bitlbee = 9;
|
||||
avahi = 10;
|
||||
portmap = 11;
|
||||
|
||||
nixbld = 30000; # start of range of uids
|
||||
nobody = 65534;
|
||||
@ -24,6 +25,7 @@
|
||||
vsftpd = 7;
|
||||
ftp = 8;
|
||||
avahi = 10;
|
||||
portmap = 11;
|
||||
audio = 17;
|
||||
|
||||
users = 100;
|
||||
|
@ -923,6 +923,18 @@
|
||||
|
||||
};
|
||||
|
||||
portmap = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable `portmap', an ONC RPC directory service
|
||||
notably used by NFS and NIS, and which can be queried
|
||||
using the rpcinfo(1) command.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
avahi = {
|
||||
|
||||
enable = mkOption {
|
||||
|
@ -158,6 +158,12 @@ let
|
||||
servers = config.services.ntp.servers;
|
||||
})
|
||||
|
||||
# portmap daemon.
|
||||
++ optional config.services.portmap.enable
|
||||
(import ../upstart-jobs/portmap.nix {
|
||||
inherit (pkgs) makePortmap;
|
||||
})
|
||||
|
||||
# Avahi daemon.
|
||||
++ optional config.services.avahi.enable
|
||||
(import ../upstart-jobs/avahi-daemon.nix {
|
||||
|
35
upstart-jobs/portmap.nix
Normal file
35
upstart-jobs/portmap.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ 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
|
||||
'';
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user