summary refs log tree commit diff
path: root/nixos/modules/services/databases
diff options
context:
space:
mode:
authorMatthieu Coudron <886074+teto@users.noreply.github.com>2023-08-17 19:19:54 +0200
committerMatthieu Coudron <886074+teto@users.noreply.github.com>2023-09-18 11:57:57 +0200
commit482619dac70c36b0876223d95daf5a8ef616c0fb (patch)
treecdf589d0a4aa27bef6aeb6a74a0d63e3aa4d3cef /nixos/modules/services/databases
parent79b7aacb8b01aaafadac109377a4f5e151c7d6b8 (diff)
downloadnixpkgs-482619dac70c36b0876223d95daf5a8ef616c0fb.tar
nixpkgs-482619dac70c36b0876223d95daf5a8ef616c0fb.tar.gz
nixpkgs-482619dac70c36b0876223d95daf5a8ef616c0fb.tar.bz2
nixpkgs-482619dac70c36b0876223d95daf5a8ef616c0fb.tar.lz
nixpkgs-482619dac70c36b0876223d95daf5a8ef616c0fb.tar.xz
nixpkgs-482619dac70c36b0876223d95daf5a8ef616c0fb.tar.zst
nixpkgs-482619dac70c36b0876223d95daf5a8ef616c0fb.zip
services.postgres: move the generated statement at the top of the file
Diffstat (limited to 'nixos/modules/services/databases')
-rw-r--r--nixos/modules/services/databases/postgresql.nix9
1 files changed, 6 insertions, 3 deletions
diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix
index 0acaf0fd00a..50d0709bcd8 100644
--- a/nixos/modules/services/databases/postgresql.nix
+++ b/nixos/modules/services/databases/postgresql.nix
@@ -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";