map users to generic postgres roles

This commit is contained in:
Noah Masur 2024-02-25 21:14:04 +00:00
parent 63434c8309
commit a5ec39cd2a

View File

@ -3,9 +3,17 @@
services.postgresql = {
package = pkgs.postgresql_15;
settings = { };
identMap = "";
authentication = ''
local all postgres peer map=root
local all admin peer map=admin
'';
identMap = ''
root postgres postgres
root root postgres
admin ${config.user} admin
'';
ensureUsers = [{
name = config.user;
name = "admin";
ensureClauses = {
createdb = true;
createrole = true;