@@ -301,11 +301,16 @@ in
301301 # implementation
302302 config = mkIf (eachSite != {}) (mkMerge [{
303303
304− assertions = mapAttrsToList (hostName: cfg:
305− { assertion = cfg.database.createLocally -> cfg.database.user == user;
306− message = ''services.wordpress.sites."${hostName}".database.user must be ${user} if the database is to be automatically provisioned'';
307− }
308− ) eachSite;
304+ assertions =
305+ (mapAttrsToList (hostName: cfg:
306+ { assertion = cfg.database.createLocally -> cfg.database.user == user;
307+ message = ''services.wordpress.sites."${hostName}".database.user must be ${user} if the database is to be automatically provisioned'';
308+ }) eachSite) ++
309+ (mapAttrsToList (hostName: cfg:
310+ { assertion = cfg.database.createLocally -> cfg.database.passwordFile == null;
311+ message = ''services.wordpress.sites."${hostName}".database.passwordFile cannot be specified if services.wordpress.sites."${hostName}".database.createLocally is set to true.'';
312+ }) eachSite);
313+
309314
310315 warnings = mapAttrsToList (hostName: _: ''services.wordpress."${hostName}" is deprecated use services.wordpress.sites."${hostName}"'') (oldSites cfg);
311316