NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.64k stars 13.79k forks source link

use rfc42 for nginx virtualhosts #346272

Open teto opened 1 day ago

teto commented 1 day ago

Issue description

I've had to get into nginx setup for a personal website, past the copy/paste nixos wiki thing.

  1. A first comment is that the nginx checks (apparently nginx -t) is run as part of a PreExec step of the systemd unit. I wonder if it oculd be made a checkInstallPhase ? (naive question maybe). Asking because I find issues after deploying my server and I would rather find them earlier during the build
  2. The submodule for virtualhost doesn't use rfc42 ("freeform" settings) so for instance proxy_pass becomes proxyPass in nixpkgs. I like the one-to-one mapping allowed by freeform settings so I wanted to propose that conversion. It makes nixpkgs less intimidating and you can grep proxy_pass in nixpkgs with less prior knowledge about it.
hacscred commented 1 day ago

RFC42 just gives guidelines. Your issue is really too unspecific to not result in a huge amount of discussion.

I would either like to see a concrete design for nginx specifically and not just for one option accompanied by a prototype to see that people are serious about it.

Closing this issue and creating a new one over the period of some weeks would probably lead to better results.

For example, you are saying you want to use a different style of variables, but all of that needs backwards compatibility. An approach like the out if tree simple NixOS mail server, which can develop and prove itself out of tree until someday it's the one "everyone" wants to use is much more productive. If, at some point, your simpleNginx module proves to be superior, then it could just be a PR.

If you want to keep it open, instead use it as a way to find collaboration or something like that and close it after six months.