services: create database in init

This commit is contained in:
Kabbone 2022-12-28 11:07:40 +01:00
parent 297716bf90
commit 722ed550c8
Signed by: Kabbone
SSH Key Fingerprint: SHA256:A5zPB5I6u5V78V51c362BBdCwhDhfDUVbt7NfKdjWBY
2 changed files with 7 additions and 11 deletions

View File

@ -22,23 +22,19 @@
};
authentication = pkgs.lib.mkOverride 14 ''
local all postgres peer
local giteadb gitea scram-sha-256
local nextclouddb nextcloud scram-sha-256
local synapsedb synapse scram-sha-256
local whatsappdb mautrixwa scram-sha-256
local telegramdb mautrixtele scram-sha-256
local signaldb mautrixsignal scram-sha-256
local keycloakdb keycloak scram-sha-256
host giteadb gitea localhost scram-sha-256
host nextclouddb nextcloud localhost scram-sha-256
host synapsedb synapse localhost scram-sha-256
host whatsappdb mautrixwa localhost scram-sha-256
host telegramdb mautrixtele localhost scram-sha-256
host signaldb mautrixsignal localhost scram-sha-256
host keycloakdb keycloak localhost scram-sha-256
'';
initialScript = config.age.secrets."services/postgresql/initScript.sql".path;
ensureDatabases = [
"giteadb"
"nextclouddb"
"synapsedb"
"whatsappdb"
"telegramdb"
"signaldb"
"keycloakdb"
];
ensureUsers = [
{