From ed882a6b260b81aba3bc3a98989e39296a923218 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Wed, 24 May 2023 13:51:18 -0500 Subject: [PATCH] add max connection --- flake.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/flake.nix b/flake.nix index 5791bd1..6409e4c 100644 --- a/flake.nix +++ b/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";