mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
nixos/wordpress: Ensure no passwordFile if local db deployment (#148613)
This commit is contained in:
parent
7dfeb58537
commit
ef0de7ccb5
1 changed files with 10 additions and 5 deletions
|
@ -301,11 +301,16 @@ in
|
||||||
# implementation
|
# implementation
|
||||||
config = mkIf (eachSite != {}) (mkMerge [{
|
config = mkIf (eachSite != {}) (mkMerge [{
|
||||||
|
|
||||||
assertions = mapAttrsToList (hostName: cfg:
|
assertions =
|
||||||
{ assertion = cfg.database.createLocally -> cfg.database.user == user;
|
(mapAttrsToList (hostName: cfg:
|
||||||
message = ''services.wordpress.sites."${hostName}".database.user must be ${user} if the database is to be automatically provisioned'';
|
{ assertion = cfg.database.createLocally -> cfg.database.user == user;
|
||||||
}
|
message = ''services.wordpress.sites."${hostName}".database.user must be ${user} if the database is to be automatically provisioned'';
|
||||||
) eachSite;
|
}) eachSite) ++
|
||||||
|
(mapAttrsToList (hostName: cfg:
|
||||||
|
{ assertion = cfg.database.createLocally -> cfg.database.passwordFile == null;
|
||||||
|
message = ''services.wordpress.sites."${hostName}".database.passwordFile cannot be specified if services.wordpress.sites."${hostName}".database.createLocally is set to true.'';
|
||||||
|
}) eachSite);
|
||||||
|
|
||||||
|
|
||||||
warnings = mapAttrsToList (hostName: _: ''services.wordpress."${hostName}" is deprecated use services.wordpress.sites."${hostName}"'') (oldSites cfg);
|
warnings = mapAttrsToList (hostName: _: ''services.wordpress."${hostName}" is deprecated use services.wordpress.sites."${hostName}"'') (oldSites cfg);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue