git.iko.soy/typeable/nixpkgs
on master help sign in
bitlbee service: enable plugins
commit78f7a09e3af902f5c20639c00d72ccd9dd56a55c authorAnders Papitto <anderspapitto@gmail.com> dateTue 8 Sep 2015, 12:15 (11 years ago) parent207f74e
3 files changed+37−5
nixos/modules/services/networking/bitlbee.nix+15−5 pkgs/applications/networking/instant-messengers/bitlbee/plugins.nix+20 pkgs/top-level/all-packages.nix+2
nixos/modules/services/networking/bitlbee.nix+15−5
@@ -16,11 +16,12 @@ let
1616 ''
1717 [settings]
1818 RunMode = Daemon
19− User = bitlbee
19+ User = bitlbee
2020 ConfigDir = ${cfg.configDir}
2121 DaemonInterface = ${cfg.interface}
2222 DaemonPort = ${toString cfg.portNumber}
2323 AuthMode = ${cfg.authMode}
24+ Plugindir = ${pkgs.bitlbee-plugins cfg.plugins}/lib/bitlbee
2425 ${lib.optionalString (cfg.hostName != "") "HostName = ${cfg.hostName}"}
2526 ${lib.optionalString (cfg.protocols != "") "Protocols = ${cfg.protocols}"}
2627 ${cfg.extraSettings}
@@ -72,7 +73,7 @@ in
7273 Open -- Accept connections from anyone, use NickServ for user authentication.
7374 Closed -- Require authorization (using the PASS command during login) before allowing the user to connect at all.
7475 Registered -- Only allow registered users to use this server; this disables the register- and the account command until the user identifies himself.
75− '';
76+ '';
7677 };
7778
7879 hostName = mkOption {
@@ -85,6 +86,15 @@ in
8586 '';
8687 };
8788
89+ plugins = mkOption {
90+ type = types.listOf types.package;
91+ default = [];
92+ example = literalExample "[ pkgs.bitlbee-facebook ]";
93+ description = ''
94+ The list of bitlbee plugins to install.
95+ '';
96+ };
97+
8898 configDir = mkOption {
8999 default = "/var/lib/bitlbee";
90100 type = types.path;
@@ -107,14 +117,14 @@ in
107117 default = "";
108118 description = ''
109119 Will be inserted in the Settings section of the config file.
110− '';
120+ '';
111121 };
112122
113123 extraDefaults = mkOption {
114124 default = "";
115125 description = ''
116126 Will be inserted in the Default section of the config file.
117− '';
127+ '';
118128 };
119129
120130 };
@@ -138,7 +148,7 @@ in
138148 gid = config.ids.gids.bitlbee;
139149 };
140150
141− systemd.services.bitlbee =
151+ systemd.services.bitlbee =
142152 { description = "BitlBee IRC to other chat networks gateway";
143153 after = [ "network.target" ];
144154 wantedBy = [ "multi-user.target" ];
pkgs/applications/networking/instant-messengers/bitlbee/plugins.nixnew file+20
@@ -0,0 +1,20 @@
1+{ stdenv, bitlbee }:
2+
3+with stdenv.lib;
4+
5+plugins:
6+
7+stdenv.mkDerivation {
8+ inherit bitlbee plugins;
9+ name = "bitlbee-plugins";
10+ buildInputs = [ bitlbee plugins ];
11+ phases = [ "installPhase" ];
12+ installPhase = ''
13+ mkdir -p $out/lib/bitlbee
14+ for plugin in $plugins; do
15+ for thing in $(ls $plugin/lib/bitlbee); do
16+ ln -s $plugin/lib/bitlbee/$thing $out/lib/bitlbee/
17+ done
18+ done
19+ '';
20+}
pkgs/top-level/all-packages.nix+2
@@ -10829,6 +10829,8 @@ let
1082910829 bibletime = callPackage ../applications/misc/bibletime { };
1083010830
1083110831 bitlbee = callPackage ../applications/networking/instant-messengers/bitlbee { };
10832+ bitlbee-plugins = callPackage ../applications/networking/instant-messengers/bitlbee/plugins.nix { };
10833+
1083210834 bitlbee-facebook = callPackage ../applications/networking/instant-messengers/bitlbee-facebook { };
1083310835
1083410836 bitmeter = callPackage ../applications/audio/bitmeter { };