3
0
Fork 0
forked from mirrors/nixpkgs

zammad: reformat

This commit is contained in:
Taeer Bar-Yam 2022-02-16 16:50:22 -05:00
parent 75fe105a3d
commit 4d38b6460f
5 changed files with 1323 additions and 1317 deletions

View file

@ -23,7 +23,8 @@ let
RAILS_LOG_TO_STDOUT = "true";
};
databaseConfig = settingsFormat.generate "database.yml" cfg.database.settings;
in {
in
{
options = {
services.zammad = {
@ -196,10 +197,12 @@ in {
users.groups.zammad = { };
assertions = [
{ assertion = cfg.database.createLocally -> cfg.database.user == "zammad";
{
assertion = cfg.database.createLocally -> cfg.database.user == "zammad";
message = "services.zammad.database.user must be set to \"zammad\" if services.zammad.database.createLocally is set to true";
}
{ assertion = cfg.database.createLocally -> cfg.database.passwordFile == null;
{
assertion = cfg.database.createLocally -> cfg.database.passwordFile == null;
message = "a password cannot be specified if services.zammad.database.createLocally is set to true";
}
];
@ -209,7 +212,8 @@ in {
package = mkDefault pkgs.mariadb;
ensureDatabases = [ cfg.database.name ];
ensureUsers = [
{ name = cfg.database.user;
{
name = cfg.database.user;
ensurePermissions = { "${cfg.database.name}.*" = "ALL PRIVILEGES"; };
}
];
@ -219,7 +223,8 @@ in {
enable = true;
ensureDatabases = [ cfg.database.name ];
ensureUsers = [
{ name = cfg.database.user;
{
name = cfg.database.user;
ensurePermissions = { "DATABASE ${cfg.database.name}" = "ALL PRIVILEGES"; };
}
];

View file

@ -93,7 +93,8 @@ let
packageJSON = sourceDir + "/package.json";
};
in stdenv.mkDerivation {
in
stdenv.mkDerivation {
name = "${pname}-${version}";
inherit pname version;