diff --git a/nixos/modules/services/databases/postgresql.nix b/nixos/modules/services/databases/postgresql.nix index 08a9cdd9f5da..33ee7244e3f4 100644 --- a/nixos/modules/services/databases/postgresql.nix +++ b/nixos/modules/services/databases/postgresql.nix @@ -197,7 +197,6 @@ in fi rm -f ${cfg.dataDir}/*.conf touch "${cfg.dataDir}/.first_startup" - touch "${cfg.dataDir}/postgresql-user-created" fi ln -sfn "${configFile}" "${cfg.dataDir}/postgresql.conf" @@ -231,11 +230,6 @@ in sleep 0.1 done - if ! [ -e ${cfg.dataDir}/postgresql-user-created ]; then - createuser --superuser postgres - touch ${cfg.dataDir}/postgresql-user-created - fi - if test -e "${cfg.dataDir}/.first_startup"; then ${optionalString (cfg.initialScript != null) '' cat "${cfg.initialScript}" | su -s ${pkgs.stdenv.shell} postgres -c 'psql postgres'