Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos-infra jitsi prep #297809

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions nixos/doc/manual/release-notes/rl-2405.section.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m

- `unrar` was updated to v7. See [changelog](https://www.rarlab.com/unrar7notes.htm) for more information.

- `prosody` `services.prosody.muc.*.vcard_muc` was removed in favor of `services.prosody.muc.*.extraModules`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mkRemovedOptionModule?


- `k9s` was updated to v0.31. There have been various breaking changes in the config file format,
check out the changelog of [v0.29](https://github.com/derailed/k9s/releases/tag/v0.29.0),
[v0.30](https://github.com/derailed/k9s/releases/tag/v0.30.0) and
Expand Down
12 changes: 7 additions & 5 deletions nixos/modules/services/networking/prosody.nix
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,10 @@ let
'';
};

vcard_muc = mkOption {
type = types.bool;
default = true;
description = lib.mdDoc "Adds the ability to set vCard for Multi User Chat rooms";
extraModules = mkOption {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lists tend to be annoying because they make it very difficult to remove items from the default value. Can this be an attrset instead with e.g. "muc_mam".enable = true;?

(I actually don't know if we have something better as a common pattern for this in NixOS - I just know lists are annoying and that's how I would intuitively have go at fixing this.)

type = types.listOf types.str;
default = [ "muc_mam" "vcard_muc" ];
description = "Add more modules to the muc Component";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize MUC to match the documentation in other settings. Also remove the unnecessary capitalization from Component.

};

# Extra parameters. Defaulting to prosody default values.
Expand Down Expand Up @@ -814,7 +814,9 @@ in

${lib.concatMapStrings (muc: ''
Component ${toLua muc.domain} "muc"
modules_enabled = { "muc_mam"; ${optionalString muc.vcard_muc ''"vcard_muc";'' } }
modules_enabled = {
${ lib.concatStringsSep "\n" (map (x: "${toLua x};") muc.extraModules)}
}
name = ${toLua muc.name}
restrict_room_creation = ${toLua muc.restrictRoomCreation}
max_history_messages = ${toLua muc.maxHistoryMessages}
Expand Down