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鈥檒l 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

Conversation

Janik-Haag
Copy link
Member

@Janik-Haag Janik-Haag commented Mar 21, 2024

Description of changes

Adds all the fun pieces to implement nixos/infra#401

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 馃憤 reaction to pull requests you find important.

Copy link
Contributor

@delroth delroth left a comment

Choose a reason for hiding this comment

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

I'm not sure it's a good idea to add more technical debt in the Jitsi module to fix the fact that the Prosody module doesn't use a nice user-facing API. OTOH, I also use neither of those modules, so it would be nice to get active users / maintainers for this software to weigh in.

@@ -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?

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.)

extraModules = mkOption {
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.

updateMucs = mkOption {
type = with types; attrsOf anything;
default = { };
description = "This is a very hacky work around setting and only added because prosody muc is a list.";
Copy link
Contributor

Choose a reason for hiding this comment

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

This descriptions tells me nothing at all about how this option is expected to be used or what it does. My understanding is that this is a way to inject extra Prosody settings for a MUC, which is difficult to do otherwise due to the combination of 1. the Prosody module not using an attrset for its instances; 2. the Jitsi module being in charge of configuring Prosody itself?

  1. Have you considered refactoring Prosody to use an attrset like what your updateMucs option uses as its API? It should even be doable to keep compatibility with the old list format by auto-transforming the list into an attrset using v.domain.
  2. If this is not possible, please improve the naming and documentation here. How it's implemented should be of no concern to a user of the option and has (IMHO) no place in the documentation.

@@ -205,7 +218,16 @@ in
tls = mkDefault true;
websocket = mkDefault true;
};
muc = [
# the piece of code bellow looks at the domain name of the attrs in the list and updates the attrs if the domain name matches.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: below

runHook postInstall
'';

# nothing todo here
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: to do

(And it would be more useful to document why - which is because it's all just Lua scripts.)

@Janik-Haag
Copy link
Member Author

I quit nixpkgs, and thus won't be finishing this.

@Janik-Haag Janik-Haag closed this Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants