Revert "nixos/caddy: validate at build-time" (#393806)

This commit is contained in:
Felix Bühler
2025-03-27 23:09:05 +01:00
committed by GitHub
@@ -45,23 +45,7 @@ let
settingsFormat.generate "caddy.json" cfg.settings
else
let
writeCaddyfile =
text:
pkgs.runCommandLocal "Caddyfile"
{
inherit text;
passAsFile = [ "text" ];
}
''
mkdir -p $out
cp "$textPath" $out/Caddyfile
# 'validate' cannot be used for validation, due to log location access
# See https://github.com/caddyserver/caddy/issues/6788
${lib.getExe cfg.package} adapt --config $out/Caddyfile
'';
Caddyfile = writeCaddyfile ''
Caddyfile = pkgs.writeTextDir "Caddyfile" ''
{
${cfg.globalConfig}
}