add max connection
This commit is contained in:
parent
4dec0d25ae
commit
ed882a6b26
1 changed files with 6 additions and 5 deletions
11
flake.nix
11
flake.nix
|
@ -60,6 +60,10 @@
|
|||
type = lib.types.port;
|
||||
default = 5432;
|
||||
};
|
||||
maxConnections = lib.options.mkOption {
|
||||
type = lib.types.ints.positive;
|
||||
default = 100;
|
||||
};
|
||||
superuser = lib.options.mkOption {
|
||||
type = lib.types.submodule {
|
||||
options = {
|
||||
|
@ -92,9 +96,6 @@
|
|||
passwordFile = lib.options.mkOption {
|
||||
type = lib.types.path;
|
||||
};
|
||||
# password = lib.options.mkOption {
|
||||
# type = lib.types.str;
|
||||
# };
|
||||
primary = lib.options.mkOption {
|
||||
type = lib.types.submodule {
|
||||
options = {
|
||||
|
@ -462,8 +463,8 @@
|
|||
# log_statement = "all";
|
||||
log_timezone = "America/Chicago";
|
||||
logging_collector = "off";
|
||||
max_connections = 100;
|
||||
max_wal_senders = "3";
|
||||
max_connections = cfg.maxConnections;
|
||||
max_wal_senders = 3;
|
||||
max_wal_size = "1GB";
|
||||
min_wal_size = "80MB";
|
||||
password_encryption = "scram-sha-256";
|
||||
|
|
Loading…
Reference in a new issue