add vector to dbs

This commit is contained in:
soraefir
2026-05-15 00:04:02 +02:00
parent 0ee26c817c
commit 56252474d9

View File

@@ -56,6 +56,7 @@ in {
PSQL="${pkgs.postgresql}/bin/psql"
${lib.concatMapStringsSep "\n" (name: ''
$PSQL -tAc "ALTER DATABASE ${name}_db OWNER TO ${name}_user;"
$PSQL -d "${name}_db" -tAc "CREATE EXTENSION IF NOT EXISTS vector;"
if [ -f "${config.sops.secrets."${lib.toUpper name}".path}" ]; then
PASS=$(grep "^DB_PASSWORD=" "${config.sops.secrets."${lib.toUpper name}".path}" | cut -d'=' -f2-)