mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-31 22:51:22 +00:00
zammad: reformat
This commit is contained in:
parent
75fe105a3d
commit
4d38b6460f
@ -19,11 +19,12 @@ let
|
||||
environment = {
|
||||
RAILS_ENV = "production";
|
||||
NODE_ENV = "production";
|
||||
RAILS_SERVE_STATIC_FILES="true";
|
||||
RAILS_LOG_TO_STDOUT="true";
|
||||
RAILS_SERVE_STATIC_FILES = "true";
|
||||
RAILS_LOG_TO_STDOUT = "true";
|
||||
};
|
||||
databaseConfig = settingsFormat.generate "database.yml" cfg.database.settings;
|
||||
in {
|
||||
in
|
||||
{
|
||||
|
||||
options = {
|
||||
services.zammad = {
|
||||
@ -125,7 +126,7 @@ in {
|
||||
|
||||
settings = mkOption {
|
||||
type = settingsFormat.type;
|
||||
default = {};
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
}
|
||||
@ -193,13 +194,15 @@ in {
|
||||
group = "zammad";
|
||||
};
|
||||
|
||||
users.groups.zammad = {};
|
||||
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"; };
|
||||
}
|
||||
];
|
||||
|
@ -1,29 +1,29 @@
|
||||
import ./make-test-python.nix (
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
name = "zammad";
|
||||
{
|
||||
name = "zammad";
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ garbas taeer ];
|
||||
meta.maintainers = with lib.maintainers; [ garbas taeer ];
|
||||
|
||||
nodes.machine = {
|
||||
services.zammad.enable = true;
|
||||
services.zammad.secretKeyBaseFile = pkgs.writeText "secret" ''
|
||||
52882ef142066e09ab99ce816ba72522e789505caba224a52d750ec7dc872c2c371b2fd19f16b25dfbdd435a4dd46cb3df9f82eb63fafad715056bdfe25740d6
|
||||
'';
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit("postgresql.service")
|
||||
machine.wait_for_unit("zammad-web.service")
|
||||
machine.wait_for_unit("zammad-websocket.service")
|
||||
machine.wait_for_unit("zammad-scheduler.service")
|
||||
# without the grep the command does not produce valid utf-8 for some reason
|
||||
with subtest("welcome screen loads"):
|
||||
machine.succeed(
|
||||
"curl -sSfL http://localhost:3000/ | grep '<title>Zammad Helpdesk</title>'"
|
||||
)
|
||||
nodes.machine = {
|
||||
services.zammad.enable = true;
|
||||
services.zammad.secretKeyBaseFile = pkgs.writeText "secret" ''
|
||||
52882ef142066e09ab99ce816ba72522e789505caba224a52d750ec7dc872c2c371b2fd19f16b25dfbdd435a4dd46cb3df9f82eb63fafad715056bdfe25740d6
|
||||
'';
|
||||
}
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
start_all()
|
||||
machine.wait_for_unit("postgresql.service")
|
||||
machine.wait_for_unit("zammad-web.service")
|
||||
machine.wait_for_unit("zammad-websocket.service")
|
||||
machine.wait_for_unit("zammad-scheduler.service")
|
||||
# without the grep the command does not produce valid utf-8 for some reason
|
||||
with subtest("welcome screen loads"):
|
||||
machine.succeed(
|
||||
"curl -sSfL http://localhost:3000/ | grep '<title>Zammad Helpdesk</title>'"
|
||||
)
|
||||
'';
|
||||
}
|
||||
)
|
||||
|
@ -56,13 +56,13 @@ let
|
||||
gemset = ./gemset.nix;
|
||||
groups = [
|
||||
"assets"
|
||||
"unicorn" # server
|
||||
"unicorn" # server
|
||||
"nulldb"
|
||||
"test"
|
||||
"mysql"
|
||||
"puma"
|
||||
"development"
|
||||
"postgres" # database
|
||||
"postgres" # database
|
||||
];
|
||||
gemConfig = defaultGemConfig // {
|
||||
pg = attrs: {
|
||||
@ -93,7 +93,8 @@ let
|
||||
packageJSON = sourceDir + "/package.json";
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
inherit pname version;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user