mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-17 23:19:25 +03:00
Convert "bitlbee"
svn path=/nixos/branches/fix-style/; revision=14376
This commit is contained in:
parent
adafcb8f32
commit
f9f61c0a1e
3 changed files with 82 additions and 63 deletions
|
@ -480,35 +480,6 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
bitlbee = {
|
|
||||||
|
|
||||||
enable = mkOption {
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Whether to 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.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
gnunet = {
|
gnunet = {
|
||||||
|
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
|
@ -1532,6 +1503,7 @@ in
|
||||||
(import ../upstart-jobs/lshd.nix) # GNU lshd SSH2 deamon (TODO: does neither start nor generate seed file ?)
|
(import ../upstart-jobs/lshd.nix) # GNU lshd SSH2 deamon (TODO: does neither start nor generate seed file ?)
|
||||||
(import ../upstart-jobs/ntpd.nix)
|
(import ../upstart-jobs/ntpd.nix)
|
||||||
(import ../upstart-jobs/portmap.nix)
|
(import ../upstart-jobs/portmap.nix)
|
||||||
|
(import ../upstart-jobs/bitlbee.nix)
|
||||||
|
|
||||||
# nix
|
# nix
|
||||||
(import ../upstart-jobs/nix.nix) # nix options and daemon
|
(import ../upstart-jobs/nix.nix) # nix options and daemon
|
||||||
|
|
|
@ -1,12 +1,58 @@
|
||||||
args: with args;
|
{pkgs, config, ...}:
|
||||||
|
|
||||||
|
###### interface
|
||||||
|
let
|
||||||
|
inherit (pkgs.lib) mkOption mkIf;
|
||||||
|
|
||||||
|
options = {
|
||||||
|
services = {
|
||||||
|
bitlbee = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to 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.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
|
||||||
|
###### implementation
|
||||||
|
|
||||||
let
|
let
|
||||||
bitlbeeUid = (import ../system/ids.nix).uids.bitlbee;
|
bitlbeeUid = (import ../system/ids.nix).uids.bitlbee;
|
||||||
|
inherit (config.services.bitlbee) portNumber interface;
|
||||||
in
|
in
|
||||||
{
|
|
||||||
name = "bitlbee";
|
|
||||||
|
|
||||||
users = [
|
mkIf config.services.bitlbee.enable {
|
||||||
|
|
||||||
|
require = [
|
||||||
|
options
|
||||||
|
];
|
||||||
|
|
||||||
|
users = {
|
||||||
|
extraUsers = [
|
||||||
{ name = "bitlbee";
|
{ name = "bitlbee";
|
||||||
uid = bitlbeeUid;
|
uid = bitlbeeUid;
|
||||||
description = "BitlBee user";
|
description = "BitlBee user";
|
||||||
|
@ -14,11 +60,16 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
groups = [
|
extraGroups = [
|
||||||
{ name = "bitlbee";
|
{ name = "bitlbee";
|
||||||
gid = (import ../system/ids.nix).gids.bitlbee;
|
gid = (import ../system/ids.nix).gids.bitlbee;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
extraJobs = [{
|
||||||
|
name = "bitlbee";
|
||||||
|
|
||||||
job = ''
|
job = ''
|
||||||
description "BitlBee IRC to other chat networks gateway"
|
description "BitlBee IRC to other chat networks gateway"
|
||||||
|
@ -33,8 +84,10 @@ start script
|
||||||
fi
|
fi
|
||||||
end script
|
end script
|
||||||
|
|
||||||
respawn ${bitlbee}/sbin/bitlbee -F -p ${toString portNumber} \
|
respawn ${pkgs.bitlbee}/sbin/bitlbee -F -p ${toString portNumber} \
|
||||||
-i ${interface} -u bitlbee
|
-i ${interface} -u bitlbee
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
}];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -231,12 +231,6 @@ let
|
||||||
inherit config pkgs;
|
inherit config pkgs;
|
||||||
})
|
})
|
||||||
|
|
||||||
++ optional config.services.bitlbee.enable
|
|
||||||
(import ../upstart-jobs/bitlbee.nix {
|
|
||||||
inherit (pkgs) bitlbee;
|
|
||||||
inherit (config.services.bitlbee) portNumber interface;
|
|
||||||
})
|
|
||||||
|
|
||||||
# Postfix mail server.
|
# Postfix mail server.
|
||||||
++ optional config.services.postfix.enable
|
++ optional config.services.postfix.enable
|
||||||
(import ../upstart-jobs/postfix.nix {
|
(import ../upstart-jobs/postfix.nix {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue