diff options
author | Taeer Bar-Yam <taeer@bar-yam.me> | 2022-02-16 16:50:22 -0500 |
---|---|---|
committer | Taeer Bar-Yam <taeer@bar-yam.me> | 2022-02-23 10:41:27 -0500 |
commit | 4d38b6460f564bd69586fe5c1bdead99310f31cd (patch) | |
tree | ffe17a33fcbe3e1fa5178e095b6da4586036c8c7 /nixos/modules/services | |
parent | 75fe105a3d080bc91db9f79d80c56d24e6631592 (diff) | |
download | nixpkgs-4d38b6460f564bd69586fe5c1bdead99310f31cd.tar nixpkgs-4d38b6460f564bd69586fe5c1bdead99310f31cd.tar.gz nixpkgs-4d38b6460f564bd69586fe5c1bdead99310f31cd.tar.bz2 nixpkgs-4d38b6460f564bd69586fe5c1bdead99310f31cd.tar.lz nixpkgs-4d38b6460f564bd69586fe5c1bdead99310f31cd.tar.xz nixpkgs-4d38b6460f564bd69586fe5c1bdead99310f31cd.tar.zst nixpkgs-4d38b6460f564bd69586fe5c1bdead99310f31cd.zip |
zammad: reformat
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/development/zammad.nix | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/nixos/modules/services/development/zammad.nix b/nixos/modules/services/development/zammad.nix index 17f78acdfa3..245e3eea5df 100644 --- a/nixos/modules/services/development/zammad.nix +++ b/nixos/modules/services/development/zammad.nix @@ -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"; }; } ]; |