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

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.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation 8.has: changelog 8.has: module (update) This PR changes an existing module in `nixos/` labels Mar 21, 2024
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Mar 21, 2024
@Janik-Haag Janik-Haag marked this pull request as ready for review March 22, 2024 10:59
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Apr 5, 2024
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
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants