Skip to content
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/nextcloud: Add support for caddy webserver #164565

Closed
wants to merge 1 commit into from

Conversation

onny
Copy link
Contributor

@onny onny commented Mar 17, 2022

Description of changes

This PR adds support for caddy webserver. Everything should work as before but with this you'll be able to choose between Nginx and Caddy as a web server:

services.nextcloud = {
  enable = true;
  webserver = "caddy";
}
  • Update tests
  • Update release notes
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Mar 17, 2022
@onny onny marked this pull request as draft March 17, 2022 10:03
@aanderse
Copy link
Member

I'm pretty sure in the past the maintainers explicitly rejected supporting multiple web servers due to the already complex module code.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Mar 21, 2022
@onny onny changed the title [DRAFT] nixos/nextcloud: Add support for caddy webserver nixos/nextcloud: Add support for caddy webserver Mar 22, 2022
@onny onny requested a review from Ma27 March 22, 2022 11:42
@onny onny marked this pull request as ready for review March 22, 2022 11:42
@onny onny force-pushed the nextcloud-caddy branch 3 times, most recently from 3216488 to e26bdde Compare March 22, 2022 13:28
@onny
Copy link
Contributor Author

onny commented Apr 12, 2022

I'm pretty sure in the past the maintainers explicitly rejected supporting multiple web servers due to the already complex module code.

Maybe we can merge this as an exception? UwU ^^

@aanderse
Copy link
Member

That is entirely up to the maintainers.

ping @Ma27

@Ma27
Copy link
Member

Ma27 commented Apr 16, 2022

Sorry, but I'll remain opposed to the proposed change:

  • maintaining HTTP routing for several webservers shifts an additional maintenance workload towards the Nextcloud maintainers that I'm not willing to take. Yes, we also support e.g. multiple database systems here, but in contrast to what the HTTP server is supposed to do it's a rather trivial thing IMHO (to be clear, it's already non-trivial on certain occasions to keep the nginx config working for several majors, so this is not about laziness from my side).
  • there's some documentation in the manual on how to configure nextcloud with an alternative reverse proxy using httpd as example. This is also supposed to work with caddy instead.
  • speaking of httpd, httpd and nginx are the most popular reverse-proxies/webservers out there and we already decided against directly implementing httpd support into the module, so I don't see any reason why we should make an exception now for an even less popular one (even though I acknowledge that there are fair reasons for caddy to be used).
  • Finally, if we want to make our services modules independent of a reverse proxy (which is needed in case of e.g. php/phpfpm applications), we should do it as suggested in Develop a universal web service definition #22067 by implementing a "global" solution rather than blowing up every single module.

Hence I'm closing, from my PoV that's all to say about it. If there are some reasons you feel that haven't been addressed here, feel free to leave a comment anyways!

@Ma27 Ma27 closed this Apr 16, 2022
@onny
Copy link
Contributor Author

onny commented Mar 30, 2024

Is someone still interested in using Caddy as a webserver, I added a practical configuration example to the NixOS wiki https://nixos.wiki/wiki/Nextcloud#Use_Caddy_as_webserver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants