mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 18:05:37 +00:00
map users to generic postgres roles
This commit is contained in:
parent
63434c8309
commit
a5ec39cd2a
@ -3,9 +3,17 @@
|
|||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
package = pkgs.postgresql_15;
|
package = pkgs.postgresql_15;
|
||||||
settings = { };
|
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 = [{
|
ensureUsers = [{
|
||||||
name = config.user;
|
name = "admin";
|
||||||
ensureClauses = {
|
ensureClauses = {
|
||||||
createdb = true;
|
createdb = true;
|
||||||
createrole = true;
|
createrole = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user