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/caddy: add support for Caddy v2 #86686

Open
wants to merge 5 commits into
base: master
from

Conversation

@filalex77
Copy link
Contributor

filalex77 commented May 3, 2020

Motivation for this change

Caddy v2 was recently released.
While v2 support is necessary, configs for v1 shouldn't break (at least until 20.09).

Things done

This PR adds support for Caddy v2, and uses it by default, while still allowing users to opt-in to using Caddy v1.

Added services.caddy.adapter for supporting config formats other than Caddyfile.
See https://caddyserver.com/docs/config-adapters.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@filalex77 filalex77 mentioned this pull request May 4, 2020
4 of 10 tasks complete
@filalex77 filalex77 changed the title nixos-caddy: add support for v2 nixos/caddy: add support for Caddy v2 May 8, 2020
@filalex77 filalex77 force-pushed the filalex77:nixos-caddy-v2-migration branch from 25e256a to 72b9184 May 8, 2020
@filalex77 filalex77 marked this pull request as ready for review May 8, 2020
@filalex77 filalex77 requested review from grahamc, xfix, yorickvP and fpletz May 8, 2020
@filalex77
Copy link
Contributor Author

filalex77 commented May 8, 2020

@GrahamcOfBorg test caddy

filalex77 added 4 commits May 8, 2020
- Update configuration syntax
- Add filalex77 as a maintainer
Rename legacy v1 to `caddy1`
@filalex77 filalex77 force-pushed the filalex77:nixos-caddy-v2-migration branch from 598dae6 to 4d7b3c2 Jul 14, 2020
@filalex77
Copy link
Contributor Author

filalex77 commented Jul 14, 2020

@xfix I removed the commit adding --validate and rebased onto latest master.

@filalex77 filalex77 requested a review from xfix Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.