From 2d4975768b5010fa9cdf251cd477ca878efd042b Mon Sep 17 00:00:00 2001 From: Kabbone Date: Wed, 28 Dec 2022 11:31:59 +0100 Subject: [PATCH] services: move all database operations in initscript --- modules/services/server/postgresql.nix | 5 ----- secrets/services/postgresql/initScript.age | Bin 2442 -> 2971 bytes 2 files changed, 5 deletions(-) diff --git a/modules/services/server/postgresql.nix b/modules/services/server/postgresql.nix index ef71d04..e08d452 100644 --- a/modules/services/server/postgresql.nix +++ b/modules/services/server/postgresql.nix @@ -31,11 +31,6 @@ host keycloakdb keycloak localhost scram-sha-256 ''; initialScript = config.age.secrets."services/postgresql/initScript.sql".path; - ensureDatabases = [ - "whatsappdb" - "telegramdb" - "signaldb" - ]; ensureUsers = [ { name = "gitea"; diff --git a/secrets/services/postgresql/initScript.age b/secrets/services/postgresql/initScript.age index 1fb9eb56c37c35004fa72863dc75b42e8898eae1..60736fc8f702afca23b256fa901b82e233c00273 100644 GIT binary patch literal 2971 zcmY+@_ghnk0>*KLiV|^;Y6Xp;REU_pppNWwLN?hrI62v5oSaNjEfo~e)(tW&h@w_e zs#X-Y;=7B8aj06|nY15hbnhQ~`}ES?XvXN$yot4nNv6g-bZptFQCm?kgmAjtoxpA-A4Lrx|@#oYo->kT56}k!d9Xhk#-c+VB|&fgDB{PM(bgTkWu$hZ30*ipQA~ z4k+aagM;KaZ8k62js^u>Bt-Q4K#bmrz)Ch%CAGQJc_Ey@sP)s?;-CtY%0O$-sihGp z9@Gb0NCcb&^|EA$hTs=ufG|5G<>*N)JH``8*Wn2?B24zl$R5)_l*?wONdjB}J|qk{ zC@QZ0SXLyK9T2lL39^e=`vdNs7FF&>j?ku7_kLX5E7M!wV(<*HHc-=+yu8DXOYwJ zWQj>em7wOZn@usvD0DHAtW#&h%wSkU<`ZZl8%BlCNM~8q28IgZhY>nnM%PfSI3|xE z^Fn4Ejm<&n{~RJ6fPw$F6mpASF2}NLWU|w$V&dowo0h8z_{ma%)&$dWN}*jJ0Kz6H zM~%3sHg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