services.postgres: move the generated statement at the top of the file

This commit is contained in:
Matthieu Coudron 2023-08-17 19:19:54 +02:00
parent 79b7aacb8b
commit 482619dac7

View file

@ -464,13 +464,16 @@ in
services.postgresql.dataDir = mkDefault "/var/lib/postgresql/${cfg.package.psqlSchema}";
services.postgresql.authentication = mkAfter
services.postgresql.authentication = mkMerge [
(mkBefore "# Generated file; do not edit!")
(mkAfter
''
# Generated file; do not edit!
# default value of services.postgresql.authentication
local all all peer
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
'';
'')
];
users.users.postgres =
{ name = "postgres";