Revert "nixos/caddy: validate at build-time" (#393806)
This commit is contained in:
@@ -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}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user