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
nixos/caddy: fix overwriting of tls settings in config #97618
Conversation
Thanks for the fix! You can see in the PR that it originally used another way of merging the JSON, which caused issues because the way the merge was done didn't create a derivation, which is the reason why I checked your PR and the problem seems to be back, since running |
That's super unfortunate. I'd appreciate if someone who knows more jq can help fix this "properly". @xfix possibly?
|
Can confirm that the large jq command from #97217 (comment) does fix it as well. I'm very interested in what about nix-generated JSON causes it to lose the context though, that seems like a bug? Or at least, it seems rather problematic. |
This needs a rebase. |
@worldofpeace done |
3e89425
to
0d48d1f
Compare
So this is the "hack" version proposed in a PR comment elsewhere, as it, I think, passes the tests. |
0d48d1f
to
00d257c
Compare
@ofborg test caddy |
@lf- thanks for waiting and mentioning this ✨ . I think at the time the release was really eating my free time and nixos time. Good to see it's merged finally |
This fixes a bug I reported in the thread of #97217 in which jq was used to recursively merge the nix-generated TLS settings into the config, but it was not merging arrays.
I have eliminated the use of jq and instead did the config merge in Nix to maximize maintainability (since neither of us know enough jq to do it acceptably elegantly).This PR applies the jq hack as proposed in the comments.Motivation for this change
Regression (ish) from #97217 cc @sephii
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)