This commit is contained in:
soraefir
2026-05-06 02:37:23 +02:00
parent 865c12cacc
commit e3e535f527
4 changed files with 13 additions and 11 deletions

View File

@@ -60,8 +60,8 @@ in {
done
$PSQL -tAc "ALTER DATABASE ${name}_db OWNER TO ${name}_user;"
if [ -f "${config.sops.secrets."${name}_pass".path}" ]; then
PASS=''$(cut -d'=' -f2- "${config.sops.secrets."${name}_pass".path}")
if [ -f "${config.sops.secrets."${lib.toUpper name}".path}" ]; then
PASS=''$(grep "^DB_PASSWORD=" "${config.sops.secrets."${lib.toUpper name}".path}" | cut -d'=' -f2-)
$PSQL -tAc "ALTER USER ${name}_user WITH PASSWORD '$PASS';"
fi
'') allApps}