From 2ea7c908390a0828c8fbfabca70889a78122437f Mon Sep 17 00:00:00 2001 From: Oliver Charles Date: Thu, 13 Feb 2014 18:52:59 +0000 Subject: [PATCH] postgresql module: Use the default superuser username PostgreSQL defaults to having 'postgres' as the superuser. NixOS should use this default name to provide a less surprising result to people who enable services.postgres. --- nixos/modules/services/databases/postgresql.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index 265d26e8ce98..f63aec6b1452 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -190,7 +190,7 @@ in mkdir -m 0700 -p ${cfg.dataDir} if [ "$(id -u)" = 0 ]; then chown -R postgres ${cfg.dataDir} - su -s ${pkgs.stdenv.shell} postgres -c 'initdb -U root' + su -s ${pkgs.stdenv.shell} postgres -c initdb else # For non-root operation. initdb