mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-28 14:22:50 +03:00
nixos/postgresql: Use listen_addresses, not -i
The -i flag to control if PostgreSQL listens for TCP/IP connections has been deprecated, so replace it with the modern alternative.
This commit is contained in:
parent
3e3a9e661d
commit
94bd4787a9
@ -24,14 +24,13 @@ let
|
||||
|
||||
postgresql = postgresqlAndPlugins cfg.package;
|
||||
|
||||
flags = optional cfg.enableTCPIP "-i";
|
||||
|
||||
# The main PostgreSQL configuration file.
|
||||
configFile = pkgs.writeText "postgresql.conf"
|
||||
''
|
||||
hba_file = '${pkgs.writeText "pg_hba.conf" cfg.authentication}'
|
||||
ident_file = '${pkgs.writeText "pg_ident.conf" cfg.identMap}'
|
||||
log_destination = 'stderr'
|
||||
listen_addresses = '${if cfg.enableTCPIP then "*" else "localhost"}'
|
||||
port = ${toString cfg.port}
|
||||
${cfg.extraConfig}
|
||||
'';
|
||||
@ -229,7 +228,7 @@ in
|
||||
"${cfg.dataDir}/recovery.conf"
|
||||
''}
|
||||
|
||||
exec postgres ${toString flags}
|
||||
exec postgres
|
||||
'';
|
||||
|
||||
serviceConfig =
|
||||
|
Loading…
Reference in New Issue
Block a user