From eafd39c605698379eda195e3ee571ead9a10c3ee Mon Sep 17 00:00:00 2001 From: Zebreus Date: Mon, 1 Apr 2024 22:18:43 +0200 Subject: [PATCH] nixos/redmine: Fix broken assertion with sqlite3 database Somehow this was missed while working on commit ddd15dc2d9. So make the assertion working when SQLite is used. --- nixos/modules/services/misc/redmine.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/misc/redmine.nix b/nixos/modules/services/misc/redmine.nix index 957571944b28..8ebc46b42dcc 100644 --- a/nixos/modules/services/misc/redmine.nix +++ b/nixos/modules/services/misc/redmine.nix @@ -276,8 +276,8 @@ in { assertion = pgsqlLocal -> cfg.database.user == cfg.database.name; message = "services.redmine.database.user and services.redmine.database.name must be the same when using a local postgresql database"; } - { assertion = cfg.database.createLocally -> cfg.database.type != "sqlite3" && cfg.database.socket != null; - message = "services.redmine.database.socket must be set if services.redmine.database.createLocally is set to true"; + { assertion = (cfg.database.createLocally && cfg.database.type != "sqlite3") -> cfg.database.socket != null; + message = "services.redmine.database.socket must be set if services.redmine.database.createLocally is set to true and no sqlite database is used"; } { assertion = cfg.database.createLocally -> cfg.database.host == "localhost"; message = "services.redmine.database.host must be set to localhost if services.redmine.database.createLocally is set to true";