bitlbee service: enable plugins
This commit is contained in:
parent
207f74eee9
commit
78f7a09e3a
|
@ -16,11 +16,12 @@ let
|
||||||
''
|
''
|
||||||
[settings]
|
[settings]
|
||||||
RunMode = Daemon
|
RunMode = Daemon
|
||||||
User = bitlbee
|
User = bitlbee
|
||||||
ConfigDir = ${cfg.configDir}
|
ConfigDir = ${cfg.configDir}
|
||||||
DaemonInterface = ${cfg.interface}
|
DaemonInterface = ${cfg.interface}
|
||||||
DaemonPort = ${toString cfg.portNumber}
|
DaemonPort = ${toString cfg.portNumber}
|
||||||
AuthMode = ${cfg.authMode}
|
AuthMode = ${cfg.authMode}
|
||||||
|
Plugindir = ${pkgs.bitlbee-plugins cfg.plugins}/lib/bitlbee
|
||||||
${lib.optionalString (cfg.hostName != "") "HostName = ${cfg.hostName}"}
|
${lib.optionalString (cfg.hostName != "") "HostName = ${cfg.hostName}"}
|
||||||
${lib.optionalString (cfg.protocols != "") "Protocols = ${cfg.protocols}"}
|
${lib.optionalString (cfg.protocols != "") "Protocols = ${cfg.protocols}"}
|
||||||
${cfg.extraSettings}
|
${cfg.extraSettings}
|
||||||
|
@ -72,7 +73,7 @@ in
|
||||||
Open -- Accept connections from anyone, use NickServ for user authentication.
|
Open -- Accept connections from anyone, use NickServ for user authentication.
|
||||||
Closed -- Require authorization (using the PASS command during login) before allowing the user to connect at all.
|
Closed -- Require authorization (using the PASS command during login) before allowing the user to connect at all.
|
||||||
Registered -- Only allow registered users to use this server; this disables the register- and the account command until the user identifies himself.
|
Registered -- Only allow registered users to use this server; this disables the register- and the account command until the user identifies himself.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
hostName = mkOption {
|
hostName = mkOption {
|
||||||
|
@ -85,6 +86,15 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plugins = mkOption {
|
||||||
|
type = types.listOf types.package;
|
||||||
|
default = [];
|
||||||
|
example = literalExample "[ pkgs.bitlbee-facebook ]";
|
||||||
|
description = ''
|
||||||
|
The list of bitlbee plugins to install.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
configDir = mkOption {
|
configDir = mkOption {
|
||||||
default = "/var/lib/bitlbee";
|
default = "/var/lib/bitlbee";
|
||||||
type = types.path;
|
type = types.path;
|
||||||
|
@ -107,14 +117,14 @@ in
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Will be inserted in the Settings section of the config file.
|
Will be inserted in the Settings section of the config file.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
extraDefaults = mkOption {
|
extraDefaults = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Will be inserted in the Default section of the config file.
|
Will be inserted in the Default section of the config file.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -138,7 +148,7 @@ in
|
||||||
gid = config.ids.gids.bitlbee;
|
gid = config.ids.gids.bitlbee;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.bitlbee =
|
systemd.services.bitlbee =
|
||||||
{ description = "BitlBee IRC to other chat networks gateway";
|
{ description = "BitlBee IRC to other chat networks gateway";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ stdenv, bitlbee }:
|
||||||
|
|
||||||
|
with stdenv.lib;
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
inherit bitlbee plugins;
|
||||||
|
name = "bitlbee-plugins";
|
||||||
|
buildInputs = [ bitlbee plugins ];
|
||||||
|
phases = [ "installPhase" ];
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/lib/bitlbee
|
||||||
|
for plugin in $plugins; do
|
||||||
|
for thing in $(ls $plugin/lib/bitlbee); do
|
||||||
|
ln -s $plugin/lib/bitlbee/$thing $out/lib/bitlbee/
|
||||||
|
done
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
}
|
|
@ -10829,6 +10829,8 @@ let
|
||||||
bibletime = callPackage ../applications/misc/bibletime { };
|
bibletime = callPackage ../applications/misc/bibletime { };
|
||||||
|
|
||||||
bitlbee = callPackage ../applications/networking/instant-messengers/bitlbee { };
|
bitlbee = callPackage ../applications/networking/instant-messengers/bitlbee { };
|
||||||
|
bitlbee-plugins = callPackage ../applications/networking/instant-messengers/bitlbee/plugins.nix { };
|
||||||
|
|
||||||
bitlbee-facebook = callPackage ../applications/networking/instant-messengers/bitlbee-facebook { };
|
bitlbee-facebook = callPackage ../applications/networking/instant-messengers/bitlbee-facebook { };
|
||||||
|
|
||||||
bitmeter = callPackage ../applications/audio/bitmeter { };
|
bitmeter = callPackage ../applications/audio/bitmeter { };
|
||||||
|
|
Loading…
Reference in a new issue