nixos/mpd: allow to explicitly close firewall without a warning#484995
nixos/mpd: allow to explicitly close firewall without a warning#484995doronbehar merged 1 commit intoNixOS:masterfrom
Conversation
a-kenji
left a comment
There was a problem hiding this comment.
I think this is still a little odd, for lack of a better term, because this is very different from how most any other service operates in nixpkgs.
That being said, I see this as an improvement and I see no issue with this PR from that standpoint.
Yes I agree. Adding such a warning could be a nice feature to any module that has both
Thanks for the approval. Could you please test this with your config, I really want to make sure it works for you with those non-trivial network interfaces. |
|
Our warnings/assertion infrastructure as a whole could do with a lot of improvement. I think @emilazy was considering something of the sort a while back, but I am not entirely sure what came out of that work. |
|
|
||
| openFirewall = lib.mkOption { | ||
| type = lib.types.bool; | ||
| default = false; |
There was a problem hiding this comment.
It might be more ergonomic if we set the type to be either Boolean or some special string that disabled the warning. null is meaningless, especially since its behaviour is not defined in the option description.
There was a problem hiding this comment.
It might be more ergonomic if we set the type to be either Boolean or some special string that disabled the warning. null is meaningless, especially since its behaviour is not defined in the option description.
I agree. Either with null or a specific string the description will have to be modified. If I'll modify the description to explain the meaning of null would you be satisfied?
There was a problem hiding this comment.
Whatever is easiest for you seems good to me.
There was a problem hiding this comment.
Whatever is easiest for you seems good to me.
Done.
I tested it with an ipv6 |
Just out of curiosity, with |
5943f40 to
d1b74cb
Compare
|
Yes: |
Fixes NixOS#484912 and addresses the comments here: NixOS#456989 (comment)
d1b74cb to
9638294
Compare
NixOS/nixpkgs#484995 got merged, and setting this false (default is now null) suppresses firewall warnings.
Things done
passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage.