mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
nixos/postgresql: improve local peer authentication with default map
This allows to easily map allowed database roles to system users.
This commit is contained in:
parent
f934044282
commit
3d29b7d3a2
4 changed files with 58 additions and 1 deletions
|
@ -54,6 +54,9 @@ let
|
|||
services.postgresql = {
|
||||
inherit package;
|
||||
enable = true;
|
||||
identMap = ''
|
||||
postgres root postgres
|
||||
'';
|
||||
# TODO(@Ma27) split this off into its own VM test and move a few other
|
||||
# extension tests to use postgresqlTestExtension.
|
||||
extensions = ps: with ps; [ plv8 ];
|
||||
|
@ -73,7 +76,7 @@ let
|
|||
in
|
||||
''
|
||||
def check_count(statement, lines):
|
||||
return 'test $(sudo -u postgres psql postgres -tAc "{}"|wc -l) -eq {}'.format(
|
||||
return 'test $(psql -U postgres postgres -tAc "{}"|wc -l) -eq {}'.format(
|
||||
statement, lines
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue