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/httpd: add locations option to virtualHosts #76583
Conversation
@zimbatm how familiar are you with Thanks to your explanation of A simple example of using
An example which might not be so safe:
Usually web app modules will reference I appreciate any and all feedback @zimbatm. Thanks! |
Avoid using Probably the best approach is to copy the nginx model and have a set of HTTP aliases that map back to roots. Collect all the roots into a list and then generate the read-only directory entries. |
I'm not familiar with |
d144b6a
to
25ef4ae
Compare
@zimbatm I've looked through A quick example of where generating both
With As always, feedback is greatly appreciated. Thanks! |
Fundamentally we are trying to map the httpd config format to JSON-like data structures. I don't remember the syntax well enough but I think it's not completely straight-forward. Which is why the current state of the art is to write the config by hand. Try and take a look at the syntax and thing how it could be represented in pure nix data. Alternatively the directories could also be transformed into lists to bypass that specific problem:
|
@zimbatm part of the problem I'm trying to solve is making directories and locations able to merge. The |
What should happen if two different modules set values for the same location? Should they merge, fail or the last one wins? Potentially this could be handled by a filter operation after the fact. |
I would expect some merging and
|
25ef4ae
to
c82231d
Compare
c82231d
to
70a3744
Compare
70a3744
to
339189f
Compare
339189f
to
ae99800
Compare
@zimbatm I'm not satisfied I have the best answer for Look good? |
@GrahamcOfBorg test upnp |
🤷♂️ |
nixos/httpd: add locations option to virtualHosts
Motivation for this change
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)Notify maintainers
cc @