diff options
author | Robin Gloster <mail@glob.in> | 2018-03-22 03:40:46 +0100 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2018-03-22 03:40:46 +0100 |
commit | 0a80f2c0f4284428235b0f54e228f6e76f1673a7 (patch) | |
tree | e47d5435c8f3cbca827633637af674f1f051b624 /nixos | |
parent | 88f06c5ce9800d661fa85c019838fe67635aa64f (diff) | |
download | nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.tar nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.tar.gz nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.tar.bz2 nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.tar.lz nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.tar.xz nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.tar.zst nixpkgs-0a80f2c0f4284428235b0f54e228f6e76f1673a7.zip |
prosody: improve module handling
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/doc/manual/release-notes/rl-1803.xml | 5 | ||||
-rw-r--r-- | nixos/modules/services/networking/prosody.nix | 14 |
2 files changed, 16 insertions, 3 deletions
diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml index 20f23261b60..e67f1448466 100644 --- a/nixos/doc/manual/release-notes/rl-1803.xml +++ b/nixos/doc/manual/release-notes/rl-1803.xml @@ -347,6 +347,11 @@ following incompatible changes:</para> <para> The better-performing <literal>libevent</literal> backend is now enabled by default. </para> + + <para> + <literal>withCommunityModules</literal> now passes through the modules to <option>services.prosody.extraModules</option>. + Use <literal>withOnlyInstalledCommunityModules</literal> for modules that should not be enabled directly, e.g <literal>lib_ldap</literal>. + </para> </listitem> </itemizedlist> diff --git a/nixos/modules/services/networking/prosody.nix b/nixos/modules/services/networking/prosody.nix index a7b43fb78a9..d57ebb61f63 100644 --- a/nixos/modules/services/networking/prosody.nix +++ b/nixos/modules/services/networking/prosody.nix @@ -362,6 +362,12 @@ in description = "Enable custom modules"; }; + extraPluginPaths = mkOption { + type = types.listOf types.path; + default = []; + description = "Addtional path in which to look find plugins/modules"; + }; + virtualHosts = mkOption { description = "Define the virtual hosts"; @@ -411,16 +417,18 @@ in config = mkIf cfg.enable { - environment.systemPackages = [ pkgs.prosody ]; + environment.systemPackages = [ cfg.package ]; environment.etc."prosody/prosody.cfg.lua".text = '' pidfile = "/var/lib/prosody/prosody.pid" - log = "*syslog" data_path = "/var/lib/prosody" + plugin_paths = { + ${lib.concatStringsSep ", " (map (n: "\"${n}\"") cfg.extraPluginPaths) } + } ${ optionalString (cfg.ssl != null) (createSSLOptsStr cfg.ssl) } @@ -434,7 +442,7 @@ in ${ lib.concatStringsSep "\n\ \ " (lib.mapAttrsToList (name: val: optionalString val "${toLua name};") cfg.modules) } - + ${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.package.communityModules)} ${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.extraModules)} }; |