nixos/caddy: Make virtualHosts' logFormat optional (#392390)

This commit is contained in:
Florian Klink 2025-08-07 08:48:08 +02:00 committed by GitHub
commit 9e087896d6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View File

@ -30,9 +30,11 @@ let
${optionalString (
hostOpts.useACMEHost != null
) "tls ${sslCertDir}/cert.pem ${sslCertDir}/key.pem"}
log {
${hostOpts.logFormat}
}
${optionalString (hostOpts.logFormat != null) ''
log {
${hostOpts.logFormat}
}
''}
${hostOpts.extraConfig}
}

View File

@ -56,7 +56,7 @@ in
};
logFormat = mkOption {
type = types.lines;
type = types.nullOr types.lines;
default = ''
output file ${cfg.logDir}/access-${lib.replaceStrings [ "/" " " ] [ "_" "_" ] config.hostName}.log
'';