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

matrix-appservice-irc: init at 0.17.1 #89106

Closed

Conversation

puffnfresh
Copy link
Contributor

Motivation for this change

Another attempt at #62864.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

'';

meta = with lib; {
description = "A Matrix <--> IRC bridge";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
description = "A Matrix <--> IRC bridge";
description = "Node.js IRC bridge for Matrix";

Also please add homepage


passwordKeyLength = mkOption {
type = ints.unsigned;
description = "Length of te key to encrypt IRC passwords";
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
description = "Length of te key to encrypt IRC passwords";
description = "Length of the key to encrypt IRC passwords";

Also what kind of encryption scheme is this? If RSA wouldn't 4096 be more appropriate these days?


needBindingCap = mkOption {
type = bool;
description = "Whether the daemon needs to bind to ports less than 1024 (e.g. for the ident service)";
Copy link
Member

Choose a reason for hiding this comment

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

Either

Suggested change
description = "Whether the daemon needs to bind to ports less than 1024 (e.g. for the ident service)";
description = "Whether the daemon needs to bind to ports below 1024 (e.g. for the ident service)";

or

Suggested change
description = "Whether the daemon needs to bind to ports less than 1024 (e.g. for the ident service)";
description = "Whether the daemon needs to bind to privileged ports (e.g. for the ident service)";

wantedBy = [ "multi-user.target" ];

preStart = ''
mask="$(umask)"
Copy link
Member

Choose a reason for hiding this comment

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

What is the reason for this assignment if you're not using it below?

StateDirectory = "matrix-appservice-irc";
StateDirectoryMode = "755";

User = "appservice-matrix-irc";
Copy link
Member

Choose a reason for hiding this comment

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

This seems to be reversed?

Suggested change
User = "appservice-matrix-irc";
User = "matrix-appservice-irc";

Same for group.

@@ -0,0 +1,27 @@
# TODO: This has a bunch of duplication with matrix-appservice-slack
Copy link
Member

Choose a reason for hiding this comment

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

What exactly is problematic about this?

@mweinelt
Copy link
Member

The module is also missing in nixos/modules/module-list.nix.

@mweinelt
Copy link
Member

One missing optional dependency that sound quite important:

WARNING: cannot pinpoint dependency: detect-character-encoding, context: /nix/store/jzbn2xqzvyxph7sjpgh26sbrz8lzr9h0-node_matrix-appservice-irc-0.17.1/lib/node_modules/matrix-appservice-irc/node_modules/irc

[...]

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: detect-character-encoding@^0.8.0 (node_modules/irc/node_modules/detect-character-encoding):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: request to https://registry.npmjs.org/detect-character-encoding failed: cache mode is 'only-if-cached' but no cached response available.

needBindingCap = mkOption {
type = bool;
description = "Whether the daemon needs to bind to ports less than 1024 (e.g. for the ident service)";
default = false;
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't the default depend on the selected port? default = cfg.port < 1024

Copy link
Member

@mweinelt mweinelt Aug 18, 2020

Choose a reason for hiding this comment

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

No, because the option is unrelated to cfg.port. It's required when matrix-appservice-irc is supposed to run an identd server on 113/tcp. I wonder if we can get rid of this option however by parsing the configuration.

https://github.com/matrix-org/matrix-appservice-irc/blob/master/config.sample.yaml#L367-L384

@mweinelt
Copy link
Member

Superseded by #95854.

@mweinelt mweinelt closed this Aug 20, 2020
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