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.
This commit is contained in:
Oliver Charles 2014-02-13 18:52:59 +00:00
parent f3ac3a265b
commit 2ea7c90839

View file

@ -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