nixos/sslh: update and refactor for RFC42#245855
Conversation
|
@symphorien This should superseed #225602 in fixing #225454. |
|
There are already existing efforts to have a libconfig format generator: #246115 |
|
Wow, that seems way overkill. In comparison, mine is a lot simpler purely Nix implementation of the conversion, it does not handle special ints and arrays, but they could be added in the same way, if needed. |
|
There's a Nix-only implementation in #208747 that was iterated on a few times before this comment which I am taking out of a bit of context:
After a long period of silence @h7x4 came in, reviving that PR with #246115 which also has output validation and a test alongside being written in a strongly-typed language. It should be a lot more robust. Sorry about the trouble though— I've also been rebasing my PRs until this thing wraps up. |
|
Well, I don't have any strong feelings about this as I'm just interested in fixing sslh. |
|
Rebased (since #246115 has been merged) and added a release note. |
h7x4
left a comment
There was a problem hiding this comment.
A few small comments. Some of the comments regard stuff that has just been moved, so feel free to ignore if you don't think it's relevant for the refactor.
There was a problem hiding this comment.
This is sort of a nit since both of these options work, but I feel like it's more semantically correct to look at this as a discrete range from least verbose to most verbose. Therefore, I think this would be more fitting
| type = types.enum [ 0 1 2 3 4 ]; | |
| type = types.ints.between 0 4; |
There was a problem hiding this comment.
Assuming timeout of 0 is possible as well.
| type = types.int; | |
| type = types.ints.unsigned; |
There was a problem hiding this comment.
nit, makes it a bit easier to read.
| type = types.coercedTo types.str singleton (types.listOf types.str); | |
| type = with types; coercedTo str singleton (listOf str); |
|
@h7x4 thank you, I applied you suggestions. |
Description of changes
Update the sslh package and rewrite the module for RFC42
Things done
sandbox = trueset innix.conf? (See Nix manual)nixosTests.sslhsslh)./result/bin/)