.
Some checks failed
Test action / kaas (push) Failing after 1s

This commit is contained in:
Chris Kruining 2026-03-23 12:36:32 +01:00
parent 478f26a9b8
commit 2bbbe03444
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
4 changed files with 29 additions and 16 deletions

View file

@ -10,6 +10,15 @@
cfg = config.${namespace}.services.networking.caddy;
hasHosts = (cfg.hosts |> attrNames |> length) > 0;
caddyBase = pkgs.callPackage "${pkgs.path}/pkgs/by-name/ca/caddy/package.nix" {
buildGo125Module = pkgs.buildGo126Module;
caddy = caddyBase;
};
caddyPackage =
caddyBase.withPlugins {
plugins = ["github.com/corazawaf/coraza-caddy/v2@v2.1.0"];
hash = "sha256-pSXjLaZoRtKV3eFl2ySRSjl3yxi514G1Cb7pfrpxxtE=";
};
in {
options.${namespace}.services.networking.caddy = {
enable = mkEnableOption "enable caddy" // {default = true;};
@ -27,10 +36,7 @@ in {
services.caddy = {
enable = cfg.enable;
package = pkgs.caddy.withPlugins {
plugins = ["github.com/corazawaf/coraza-caddy/v2@v2.1.0"];
hash = "sha256-pSXjLaZoRtKV3eFl2ySRSjl3yxi514G1Cb7pfrpxxtE=";
};
package = caddyPackage;
virtualHosts =
cfg.hosts