Repository navigation
nixos/nginx: use nginxfmt and gixy - #57979
Conversation
There was a problem hiding this comment.
How likely is gixy to break valid configuration?
There was a problem hiding this comment.
I'm not sure how likely it is, but I'd argue that broken configurations should be fixed instead. Alternatively, writeNginxConfig can be overridden. This might not be the most convenient solution, but it's also not too painful either. Basically a writeNginxConfig = self.writeText would be sufficient. Anyway, if it's really desired, we can make it optional, or even pass arguments to gixy (but I haven't needed that myself before).
There was a problem hiding this comment.
I guess we could test on master and see how many people would complain about it.
There was a problem hiding this comment.
here to complain about it, breaks generic forward proxy configs
|
@GrahamcOfBorg test nginx |
|
Error work this code result character is added |
|
@Izorkin is it nginx or gixy that rejects the generated code? |
|
Nginx error: |
|
Ok. So it is nginx itself. |
I can't upgrade to latest unstable because of this. I get no useful error messages: |
|
@jb55 need full log. Example: |
|
lzorkin: I need the full log too, I have no idea how to get that. I just reverted these commits for now. |
|
@jb55 use |
This fixes `nginx` being unable to hash passwords, when built without `perl`, as `libxcrypt` was added to `nginx` only as propagatedBuildInput from `perl` RESOLVES NixOS#57979
Motivation for this change
Currently nginx.conf gets formatted by an awk script. This PR replaces that script by
writeNginxConfigwhich uses nginx-config-formatter to format, and gixy to analyze nginx configurations.Things done
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)nix path-info -Sbefore and after)