diff --git a/nixos/modules/services/web-servers/caddy.nix b/nixos/modules/services/web-servers/caddy.nix index 0666dfddaff..619e0f90b12 100644 --- a/nixos/modules/services/web-servers/caddy.nix +++ b/nixos/modules/services/web-servers/caddy.nix @@ -39,6 +39,13 @@ in type = types.path; description = "The data directory, for storing certificates."; }; + + package = mkOption { + default = pkgs.caddy; + defaultText = "pkgs.caddy"; + type = types.package; + description = "Caddy package to use."; + }; }; config = mkIf cfg.enable { @@ -47,7 +54,7 @@ in after = [ "network.target" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = ''${pkgs.caddy.bin}/bin/caddy -conf=${configFile} \ + ExecStart = ''${cfg.package.bin}/bin/caddy -conf=${configFile} \ -ca=${cfg.ca} -email=${cfg.email} ${optionalString cfg.agree "-agree"} ''; Type = "simple";