Merge pull request #310642 from arcnmx/keycloak-hostname-strict

nixos/keycloak: relax hostname settings assertion
This commit is contained in:
Kim Lindberger 2024-06-29 17:09:02 +02:00 committed by GitHub
commit b75986fd26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -328,7 +328,7 @@ in
};
hostname = mkOption {
type = str;
type = nullOr str;
example = "keycloak.example.com";
description = ''
The hostname part of the public URL used as base for
@ -477,6 +477,10 @@ in
assertion = createLocalPostgreSQL -> config.services.postgresql.settings.standard_conforming_strings or true;
message = "Setting up a local PostgreSQL db for Keycloak requires `standard_conforming_strings` turned on to work reliably";
}
{
assertion = cfg.settings.hostname != null || ! cfg.settings.hostname-strict or true;
message = "Setting the Keycloak hostname is required, see `services.keycloak.settings.hostname`";
}
{
assertion = cfg.settings.hostname-url or null == null;
message = ''