nixos/prosody: add muc_notifications module support (#434574)
This commit is contained in:
@@ -8,6 +8,13 @@
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.prosody;
|
||||
communityModulesToEnable =
|
||||
let
|
||||
componentSpecificModules = [ "muc_notifications" ];
|
||||
in
|
||||
lib.concatMap (
|
||||
mod: lib.optional (!(lib.elem mod componentSpecificModules)) "${toLua mod};"
|
||||
) cfg.package.communityModules;
|
||||
|
||||
sslOpts = _: {
|
||||
options = {
|
||||
@@ -546,7 +553,7 @@ let
|
||||
${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" communityModulesToEnable}
|
||||
${lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.extraModules)}
|
||||
};
|
||||
|
||||
@@ -577,7 +584,7 @@ let
|
||||
|
||||
${lib.concatMapStrings (muc: ''
|
||||
Component ${toLua muc.domain} "muc"
|
||||
modules_enabled = {${optionalString cfg.modules.mam ''"muc_mam",''}${optionalString muc.allowners_muc ''"muc_allowners",''}${optionalString muc.moderation ''"muc_moderation",''} }
|
||||
modules_enabled = {${optionalString cfg.modules.mam ''"muc_mam",''}${optionalString muc.allowners_muc ''"muc_allowners",''}${optionalString muc.moderation ''"muc_moderation",''}${optionalString (lib.elem "muc_notifications" cfg.package.communityModules) ''"muc_notifications",''} }
|
||||
name = ${toLua muc.name}
|
||||
restrict_room_creation = ${toLua muc.restrictRoomCreation}
|
||||
max_history_messages = ${toLua muc.maxHistoryMessages}
|
||||
|
||||
Reference in New Issue
Block a user