mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
Use the "assertions" option instead of mkAssert
This commit is contained in:
parent
c7171b2c8f
commit
244cf195c8
5 changed files with 52 additions and 40 deletions
|
@ -40,10 +40,12 @@ in
|
|||
|
||||
###### implementation
|
||||
|
||||
config = mkIf config.services.openfire.enable (
|
||||
mkAssert (!(config.services.openfire.usePostgreSQL -> config.services.postgresql.enable)) "
|
||||
openfire assertion failed
|
||||
" {
|
||||
config = mkIf config.services.openfire.enable {
|
||||
|
||||
assertions = singleton
|
||||
{ assertion = !(config.services.openfire.usePostgreSQL -> config.services.postgresql.enable);
|
||||
message = "OpenFire assertion failed.";
|
||||
};
|
||||
|
||||
jobs.openfire =
|
||||
{ description = "OpenFire XMPP server";
|
||||
|
@ -65,6 +67,6 @@ in
|
|||
''; # */
|
||||
};
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue