mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-03-14 18:18:59 +00:00
hosts/plover: update Keycloak service config
This commit is contained in:
parent
b1427c1c9f
commit
5ba2b6d846
@ -62,12 +62,14 @@ in
|
|||||||
|
|
||||||
# Modifying it a little bit for per-user schema.
|
# Modifying it a little bit for per-user schema.
|
||||||
systemd.services.keycloak = {
|
systemd.services.keycloak = {
|
||||||
path = [ config.services.postgresql.package ];
|
preStart = let
|
||||||
preStart = lib.mkAfter ''
|
psqlBin = "${lib.getBin config.services.postgresql.package}/bin/psql";
|
||||||
# Setting up the appropriate schema for PostgreSQL secure schema usage.
|
in
|
||||||
psql -tAc "SELECT 1 FROM information_schema.schemata WHERE schema_name='${keycloakUser}';" \
|
lib.mkAfter ''
|
||||||
| grep -q 1 || psql -tAc "CREATE SCHEMA IF NOT EXISTS AUTHORIZATION ${keycloakUser};"
|
# Setting up the appropriate schema for PostgreSQL secure schema usage.
|
||||||
'';
|
${psqlBin} -tAc "SELECT 1 FROM information_schema.schemata WHERE schema_name='${keycloakUser}';" \
|
||||||
|
| grep -q 1 || psql -tAc "CREATE SCHEMA IF NOT EXISTS AUTHORIZATION ${keycloakUser};"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Attaching it to the reverse proxy of choice.
|
# Attaching it to the reverse proxy of choice.
|
||||||
|
Loading…
Reference in New Issue
Block a user