psql things

This commit is contained in:
XenGi 2026-02-06 23:14:37 +01:00
parent 1b2e45f838
commit 854dace74e
Signed by: xengi
SSH key fingerprint: SHA256:dM+fLZGsDvyv6kunjE8bGduL24VsCFB4LEOSdmRHdG0
3 changed files with 11 additions and 4 deletions

View file

@ -29,7 +29,7 @@ let
EXECUTE format(
'ALTER ROLE %I WITH PASSWORD %L',
'${e.user.name}',
trim(both E'\n' from pg_read_file('${config.age.secrets.postgres-${entry.user.name}.path}'))
trim(both E'\n' from pg_read_file('${config.age.secrets."postgres-${e.user.name}".path}'))
);
END IF;
END
@ -60,7 +60,7 @@ in
};
};
systemd.services.postgresql.postStart = ''
${pkgs.postgresql}/bin/psql \
${config.services.postgresql.package}/bin/psql \
--dbname=postgres \
--no-password \
--file=${passwordScript}