############################################################################################## # Enable postgresql services.postgresql = { enable = true; package = pkgs.postgresql_16; enableTCPIP = true; ensureDatabases = [ "mydatabase" ]; #authentication = pkgs.lib.mkOverride 10 '' authentication = pkgs.lib.mkForce '' #type database DBuser auth-method # local all all trust # Generated file; do not edit! # TYPE DATABASE USER ADDRESS METHOD local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trust ''; # ... }; # doas -u postgres psql # postgres=# create database qgis; # postgres=# create user myuser with encrypted password 'qgis'; # postgres=# grant all privileges on database qgis to qgis; # /l (list databases) # /du (list all users) # # psql -U qgis -d qgis # select grantee, table_catalog, privilege_type, table_schema, table_name from information_schema.table_privileges order by grantee, table_schema, table_name; ##############################################################################