try to statically set caddy to prevent cloudflare hash breaking

This commit is contained in:
Noah Masur
2025-09-30 16:32:48 -04:00
parent 774773c748
commit 68d8e60b7e
2 changed files with 16 additions and 4 deletions

15
pkgs/caddy/package.nix Normal file
View File

@@ -0,0 +1,15 @@
# Caddy with Cloudflare DNS
{
pkgs,
...
}:
# Maintain a static version so that the plugin hash doesn't keep breaking
(pkgs.caddy.override {
version = "2.10.2";
}).withPlugins
{
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
hash = "sha256-AcWko5513hO8I0lvbCLqVbM1eWegAhoM0J0qXoWL/vI=";
}

View File

@@ -66,10 +66,7 @@ in
nmasur.presets.services.caddy.cidrAllowlist = cloudflareIpRanges; nmasur.presets.services.caddy.cidrAllowlist = cloudflareIpRanges;
# Tell Caddy to use Cloudflare DNS for ACME challenge validation # Tell Caddy to use Cloudflare DNS for ACME challenge validation
services.caddy.package = pkgs.caddy.withPlugins { services.caddy.package = pkgs.nmasur.caddy;
plugins = [ "github.com/caddy-dns/cloudflare@v0.2.1" ];
hash = "sha256-AcWko5513hO8I0lvbCLqVbM1eWegAhoM0J0qXoWL/vI=";
};
nmasur.presets.services.caddy.tlsPolicies = [ nmasur.presets.services.caddy.tlsPolicies = [
{ {
issuers = [ issuers = [