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;
|
type = lib.types.port;
|
||||||
default = 5432;
|
default = 5432;
|
||||||
};
|
};
|
||||||
|
maxConnections = lib.options.mkOption {
|
||||||
|
type = lib.types.ints.positive;
|
||||||
|
default = 100;
|
||||||
|
};
|
||||||
superuser = lib.options.mkOption {
|
superuser = lib.options.mkOption {
|
||||||
type = lib.types.submodule {
|
type = lib.types.submodule {
|
||||||
options = {
|
options = {
|
||||||
|
@ -92,9 +96,6 @@
|
||||||
passwordFile = lib.options.mkOption {
|
passwordFile = lib.options.mkOption {
|
||||||
type = lib.types.path;
|
type = lib.types.path;
|
||||||
};
|
};
|
||||||
# password = lib.options.mkOption {
|
|
||||||
# type = lib.types.str;
|
|
||||||
# };
|
|
||||||
primary = lib.options.mkOption {
|
primary = lib.options.mkOption {
|
||||||
type = lib.types.submodule {
|
type = lib.types.submodule {
|
||||||
options = {
|
options = {
|
||||||
|
@ -462,8 +463,8 @@
|
||||||
# log_statement = "all";
|
# log_statement = "all";
|
||||||
log_timezone = "America/Chicago";
|
log_timezone = "America/Chicago";
|
||||||
logging_collector = "off";
|
logging_collector = "off";
|
||||||
max_connections = 100;
|
max_connections = cfg.maxConnections;
|
||||||
max_wal_senders = "3";
|
max_wal_senders = 3;
|
||||||
max_wal_size = "1GB";
|
max_wal_size = "1GB";
|
||||||
min_wal_size = "80MB";
|
min_wal_size = "80MB";
|
||||||
password_encryption = "scram-sha-256";
|
password_encryption = "scram-sha-256";
|
||||||
|
|
Loading…
Reference in a new issue