Repository navigation
nixos/crowdsec: init module - #437310
nixos/crowdsec: init module#437310
Conversation
|
@rharish101 you can try this branch out again. I've added the |
e61408a to
acd3bf1
Compare
|
Seems to be working fine so far with I did see a few minor issues, so I'll try to point them out as a review. |
rharish101
left a comment
There was a problem hiding this comment.
Minor nits, but without them, my config doesn't build.
acd3bf1 to
1f9a0d4
Compare
I applied your suggestions. |
MattSturgeon
left a comment
There was a problem hiding this comment.
I've not reviewed in depth and I'm not too familiar with crowdsec or similar existing modules in NixOS. But here's some thoughts:
There was a problem hiding this comment.
I suspect it may be simpler (and more robust) to use mkMerge in this systemd.tmpfiles.settings definition, instead of using // updates.
One case mkMerge handles better is when the same attrname is defined by both sides. // would simply shadow the LHS with the RHS's value, while mkMerge would merge the two definitions (or throw a sane error if that's not possible).
There was a problem hiding this comment.
I see your point but I think that I'm not experienced enough to give a strong opinion about this... but I'd say that using mkMerge may be the more intuitive one.
However, I'd wait for another opinion who is more experienced than me 😅
There was a problem hiding this comment.
I question why we need a parsePortFromURLOption function at all, when it is only used once.
Would it make more sense to use let bindings to make the "extract a port" logic more readable? Or even lib.pipe it?
There was a problem hiding this comment.
I'm fine with both ways.
1f9a0d4 to
8972ca9
Compare
8972ca9 to
e318dfa
Compare
Co-Authored-By: acuteaangle <[email protected]> Co-Authored-By: m0ustach3 <[email protected]>
e318dfa to
a2c6b5e
Compare
|
@MattSturgeon thank you for your review! I applied the easier changes. If you want, you can skim through it again. |
|
@rharish101 may I ask if everything worked on your system? Did you encounter any issues? |
No issues, everything's working perfectly! I'd be happy if this got merged as soon as we can. |
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
|
Thanks for your contribution! |
|
Thanks a lot everyone! |
|
Thank you for this! |
Two different PRs, two different issues. The first PR, chronologically-merged-in, NixOS#426687 introduced a new module, and while reviewers “reviewed” the `meta.maintainers` entry, they did not notice the maintainer was not in the maintainers list file. - NixOS#426687 (comment) Then, in NixOS#437310, merged a few days later, another new module was added with M0ustach3 as a maintainer. At the very least, an attempt was made in de66c73 to add the maintainer to the list, but an unfortunate typo (or two?) in the maintainers list entry means the two intended usage of the new entry still don't work. The issue here is not from the contributors. The reviewers and committers could have done better, but it's not even truly their fault. The issue is the meta information in NixOS modules was never checked. In any way AFAICT. Otherwise this would have been caught immediately, and not four months later. Anyway, the intent clearly is that the entry should matche the GitHub username.
Two different PRs, two different issues. The first PR, chronologically-merged-in, NixOS#426687 introduced a new module, and while reviewers “reviewed” the `meta.maintainers` entry, they did not notice the maintainer was not in the maintainers list file. - NixOS#426687 (comment) Then, in NixOS#437310, merged a few days later, another new module was added with M0ustach3 as a maintainer. At the very least, an attempt was made in de66c73 to add the maintainer to the list, but an unfortunate typo (or two?) in the maintainers list entry means the two intended usage of the new entry still don't work. The issue here is not from the contributors. The reviewers and committers could have done better, but it's not even truly their fault. The issue is the meta information in NixOS modules was never checked. In any way AFAICT. Otherwise this would have been caught immediately, and not four months later. Anyway, the intent clearly is that the entry should matche the GitHub username.
Two different PRs, two different issues. The first PR, chronologically-merged-in, NixOS#426687 introduced a new module, and while reviewers “reviewed” the `meta.maintainers` entry, they did not notice the maintainer was not in the maintainers list file. - NixOS#426687 (comment) Then, in NixOS#437310, merged a few days later, another new module was added with M0ustach3 as a maintainer. At the very least, an attempt was made in de66c73 to add the maintainer to the list, but an unfortunate typo (or two?) in the maintainers list entry means the two intended usage of the new entry still don't work. The issue here is not from the contributors. The reviewers and committers could have done better, but it's not even truly their fault. The issue is the meta information in NixOS modules was never checked. In any way AFAICT. Otherwise this would have been caught immediately, and not four months later. Anyway, the intent clearly is that the entry should matche the GitHub username.
Two different PRs, two different issues. The first PR, chronologically-merged-in, NixOS#426687 introduced a new module, and while reviewers “reviewed” the `meta.maintainers` entry, they did not notice the maintainer was not in the maintainers list file. - NixOS#426687 (comment) Then, in NixOS#437310, merged a few days later, another new module was added with M0ustach3 as a maintainer. At the very least, an attempt was made in de66c73 to add the maintainer to the list, but an unfortunate typo (or two?) in the maintainers list entry means the two intended usage of the new entry still don't work. The issue here is not from the contributors. The reviewers and committers could have done better, but it's not even truly their fault. The issue is the meta information in NixOS modules was never checked. In any way AFAICT. Otherwise this would have been caught immediately, and not four months later. Anyway, the intent clearly is that the entry should matche the GitHub username. (cherry picked from commit 43eca5c)
Two different PRs, two different issues. The first PR, chronologically-merged-in, #426687 introduced a new module, and while reviewers “reviewed” the `meta.maintainers` entry, they did not notice the maintainer was not in the maintainers list file. - #426687 (comment) Then, in #437310, merged a few days later, another new module was added with M0ustach3 as a maintainer. At the very least, an attempt was made in de66c73 to add the maintainer to the list, but an unfortunate typo (or two?) in the maintainers list entry means the two intended usage of the new entry still don't work. The issue here is not from the contributors. The reviewers and committers could have done better, but it's not even truly their fault. The issue is the meta information in NixOS modules was never checked. In any way AFAICT. Otherwise this would have been caught immediately, and not four months later. Anyway, the intent clearly is that the entry should matche the GitHub username. (cherry picked from commit 43eca5c)
Two different PRs, two different issues. The first PR, chronologically-merged-in, NixOS#426687 introduced a new module, and while reviewers “reviewed” the `meta.maintainers` entry, they did not notice the maintainer was not in the maintainers list file. - NixOS#426687 (comment) Then, in NixOS#437310, merged a few days later, another new module was added with M0ustach3 as a maintainer. At the very least, an attempt was made in de66c73 to add the maintainer to the list, but an unfortunate typo (or two?) in the maintainers list entry means the two intended usage of the new entry still don't work. The issue here is not from the contributors. The reviewers and committers could have done better, but it's not even truly their fault. The issue is the meta information in NixOS modules was never checked. In any way AFAICT. Otherwise this would have been caught immediately, and not four months later. Anyway, the intent clearly is that the entry should matche the GitHub username.

Continues #426875 due to a probably stupid mistake from my side...
I hope that I correctly applied the
Co-authored-byin the last commit. If not: Feel free to correct me.I'm sorry for the noise.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.