MyNixOS website logo
option

services.caddy.adapter

Name of the config adapter to use. See https://caddyserver.com/docs/config-adapters for the full list.

If null is specified, the --adapter argument is omitted when starting or restarting Caddy. Notably, this allows specification of a configuration file in Caddy's native JSON format, as long as the filename does not start with Caddyfile (in which case the caddyfile adapter is implicitly enabled). See https://caddyserver.com/docs/command-line#caddy-run for details.

Any value other than null or caddyfile is only valid when providing your own configFile.
Declarations
Type
null or string
Default
if ((cfg.configFile != configFile) || (builtins.baseNameOf cfg.configFile) == "Caddyfile") then "caddyfile" else null
Example
nginx