diff --git a/modules/nixos/services/postgresql.nix b/modules/nixos/services/postgresql.nix index b1a367a..1784ea3 100644 --- a/modules/nixos/services/postgresql.nix +++ b/modules/nixos/services/postgresql.nix @@ -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;