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.20.1 #95854
Conversation
also cc @andir |
c59bb5f
to
4351568
Compare
4351568
to
7d9020a
Compare
@ofborg eval |
This comment has been minimized.
This comment has been minimized.
7d9020a
to
17c733e
Compare
This comment has been minimized.
This comment has been minimized.
74c332a
to
e0e5c9a
Compare
@ofborg eval |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
cc @jonringer -- sorry to add to your workload, but I'm really itching to see this in 20.09 -- any chance you could look at merging? |
to be honest, I'm not the biggest fan of these massive node diffs, it's 1000's of lines in the source repo, and it's a significant runtime closure which can't be shared with other node programs. However, I'm not aware of a better paradigm
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
at the very least, this should probably be 3 commits:
maintainer
matrix-appservice-irc
nixos/matrix-appservice-irc
and maybe the test as another.
e0e5c9a
to
a87afa9
Compare
@jonringer have split 👍 |
a87afa9
to
f29c1ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. In general this looks pretty good, I added remarks to some nits and questions. Loving the test!
I'm also a bit torn by the node madness, but we certainly need to apply a cost-benefit equation for cases like this.
I'm already running the version by @puffnfresh and will test this update asap. If all goes well I think we'll be ready for 20.09.
services.matrix-synapse = { | ||
enable = true; | ||
database_type = "sqlite3"; | ||
app_service_config_files = [ "/registration.yml" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the absolute path here work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, the registration file is copied to this location. Weird choice of location.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why synapse should even be allowed to read this location. Maybe the synapse home would be a more appropriate location, and then we think about locking down synapse more in a next step.
The editorconfig test stage is unhappy.
I guess we need an exception like Lines 98 to 99 in 5d8dd5c
Maybe @zowoq has some input. |
Done: 4b00ca0 |
Co-authored-by: Jamie McClymont <jamie@kwiius.com>
d78f9ae
to
0c70f3e
Compare
Okay, rebased on master and nits addressed other than the extraneous newlines, which are required by black -_- -- on the whole I'd still rather keep doCheck on. |
0c70f3e
to
2a2c8d2
Compare
2a2c8d2
to
a2ed3d9
Compare
freeformType = unspecified; | ||
|
||
options = { | ||
homeserver = mkOption { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This restricts the possible options that are usable below homeserver.
https://github.com/matrix-org/matrix-appservice-irc/blob/develop/config.schema.yml#L33-L50
error: The option `services.matrix-appservice-irc.settings.homeserver.enablePresence' defined in `/etc/nixos/config/matrix/appservice-irc.nix' does not exist.
Inspired by, but not a copy of, github:NixOS/nixpkgs#95854.
# Allow synapse access to the registration | ||
if ${getBin pkgs.glibc}/bin/getent group matrix-synapse > /dev/null; then | ||
chgrp matrix-synapse ${registrationFile} | ||
chmod g+r ${registrationFile} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like something that's going to bite the first person working with a home server that is not Synapse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, let's address that when another homeserver implements the appservice protocol.
Edit: the appservice protocol is specified.
https://matrix.org/docs/spec/application_service/latest
|
||
# Generate registration | ||
if ! [ -f "${registrationFile}" ]; then | ||
${bin} -c ${configFile} -f ${registrationFile} -r -u ${cfg.registrationUrl} -l ${cfg.localpart} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be generated once and never be updated, even when the configuration changes.
Motivation for this change
Time for attempt number 7 (!) at getting this in!
This PR:
Thanks to all those whose work this is building on. I'd love to be able to use this in 20.09 :)
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)