Added enableTCPIP option for postgresql (defaults to false) to allow tcpip connections
svn path=/nixos/trunk/; revision=15391
This commit is contained in:
parent
0f99f50e34
commit
e3ad6a6f59
@ -2286,6 +2286,12 @@ in
|
||||
How to authorize users.
|
||||
Note: ident needs absolute trust to all allowed client hosts.";
|
||||
};
|
||||
enableTCPIP = mkOption {
|
||||
default = false;
|
||||
description = "
|
||||
Whether to run PostgreSQL with -i flag to enable TCP/IP connections.
|
||||
";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ let
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
rec {
|
||||
name = "postgresql";
|
||||
|
||||
users = [
|
||||
@ -28,6 +28,9 @@ in
|
||||
|
||||
extraPath = [postgresql];
|
||||
|
||||
flags =
|
||||
if cfg.enableTCPIP then ["-i"] else [] ;
|
||||
|
||||
job = ''
|
||||
description "PostgreSQL server"
|
||||
|
||||
@ -43,6 +46,6 @@ in
|
||||
cp -f ${pkgs.writeText "pg_hba.conf" cfg.authentication} ${cfg.dataDir}/pg_hba.conf
|
||||
end script
|
||||
|
||||
respawn ${run} -c '${postgresql}/bin/postgres -D ${cfg.dataDir}'
|
||||
respawn ${run} -c '${postgresql}/bin/postgres -D ${cfg.dataDir} ${toString flags}'
|
||||
'';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user