about summary refs log tree commit diff
path: root/nixos/modules/services/databases
diff options
context:
space:
mode:
authorOliver Charles <ollie@ocharles.org.uk>2014-02-13 18:52:59 +0000
committerOliver Charles <ollie@ocharles.org.uk>2014-02-13 18:52:59 +0000
commit2ea7c908390a0828c8fbfabca70889a78122437f (patch)
tree18b7bc8a125fa8fd0df6c0589e58c860f3ef1d4a /nixos/modules/services/databases
parentf3ac3a265b5c8e3f15e76c2261c9c2500c3493ba (diff)
downloadnixlib-2ea7c908390a0828c8fbfabca70889a78122437f.tar
nixlib-2ea7c908390a0828c8fbfabca70889a78122437f.tar.gz
nixlib-2ea7c908390a0828c8fbfabca70889a78122437f.tar.bz2
nixlib-2ea7c908390a0828c8fbfabca70889a78122437f.tar.lz
nixlib-2ea7c908390a0828c8fbfabca70889a78122437f.tar.xz
nixlib-2ea7c908390a0828c8fbfabca70889a78122437f.tar.zst
nixlib-2ea7c908390a0828c8fbfabca70889a78122437f.zip
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.
Diffstat (limited to 'nixos/modules/services/databases')
-rw-r--r--nixos/modules/services/databases/postgresql.nix2
1 files changed, 1 insertions, 1 deletions
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