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";