Add BitlBee Upstart job in deamon mode.
svn path=/nixos/trunk/; revision=10720
This commit is contained in:
parent
a9281eae63
commit
b98cb9a770
@ -10,6 +10,7 @@
|
||||
nagios = 6;
|
||||
vsftpd = 7;
|
||||
ftp = 8;
|
||||
bitlbee = 9;
|
||||
nixbld = 30000; # start of range of uids
|
||||
nobody = 65534;
|
||||
};
|
||||
|
@ -807,6 +807,34 @@
|
||||
|
||||
};
|
||||
|
||||
bitlbee = {
|
||||
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = ''
|
||||
Whether the run the BitlBee IRC to other chat network gateway.
|
||||
Running it allows you to access the MSN, Jabber, Yahoo! and ICQ chat
|
||||
networks via an IRC client.
|
||||
'';
|
||||
};
|
||||
|
||||
interface = mkOption {
|
||||
default = "127.0.0.1";
|
||||
description = ''
|
||||
The interface the BitlBee deamon will be listening to. If `127.0.0.1',
|
||||
only clients on the local host can connect to it; if `0.0.0.0', clients
|
||||
can access it from any network interface.
|
||||
'';
|
||||
};
|
||||
|
||||
portNumber = mkOption {
|
||||
default = "6667";
|
||||
description = ''
|
||||
Number of the port BitlBee will be listening to.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
xserver = {
|
||||
|
||||
|
30
upstart-jobs/bitlbee.nix
Normal file
30
upstart-jobs/bitlbee.nix
Normal file
@ -0,0 +1,30 @@
|
||||
args: with args;
|
||||
{
|
||||
name = "bitlbee";
|
||||
|
||||
users = [
|
||||
{ name = "bitlbee";
|
||||
uid = (import ../system/ids.nix).uids.bitlbee;
|
||||
description = "BitlBee user";
|
||||
home = "/var/empty";
|
||||
}
|
||||
];
|
||||
|
||||
job = "
|
||||
description \"BitlBee IRC to other chat networks gateway\"
|
||||
|
||||
start on network-interfaces/started
|
||||
stop on network-interfaces/stop
|
||||
|
||||
start script
|
||||
if ! test -d /var/lib/bitlbee
|
||||
then
|
||||
mkdir -p /var/lib/bitlbee
|
||||
fi
|
||||
end script
|
||||
|
||||
# FIXME: Eventually we want to use inetd instead of using `-D'.
|
||||
respawn ${bitlbee}/sbin/bitlbee -D -p ${portNumber} -i ${interface}
|
||||
";
|
||||
|
||||
}
|
@ -236,6 +236,12 @@ let
|
||||
inherit config pkgs;
|
||||
})
|
||||
|
||||
++ optional config.services.bitlbee.enable
|
||||
(import ../upstart-jobs/bitlbee.nix {
|
||||
inherit (pkgs) bitlbee;
|
||||
inherit (config.services.bitlbee) portNumber interface;
|
||||
})
|
||||
|
||||
# ALSA sound support.
|
||||
++ optional config.sound.enable
|
||||
(import ../upstart-jobs/alsa.nix {
|
||||
|
Loading…
Reference in New Issue
Block a user