blob: 24c714ef28e64c43f6d316e03dfabc2f44dcdb85 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
{
workerName ? null,
dbGroup ? null,
}:
{
name = "psycopg2";
args = {
user = "matrix-synapse-rory-gay";
password = "somepassword";
database = "matrix-synapse-rory-gay";
host = "/run/postgresql";
application_name = "matrix-synapse (rory.gay) - ${if workerName == null then throw "synapse/db.nix: workerName unspecified" else workerName}";
cp_min =
if dbGroup == "solo" then
1
else if dbGroup == "small" then
2
else if dbGroup == "medium" then
5
else if dbGroup == "large" then
10
else
throw "synapse/db.nix: Invalid dbGroup: ${if dbGroup == null then "null" else dbGroup}";
cp_max =
if dbGroup == "solo" then
1
else if dbGroup == "small" then
2
else if dbGroup == "medium" then
10
else if dbGroup == "large" then
10
else
throw "synapse/db.nix: Invalid dbGroup: ${if dbGroup == null then "null" else dbGroup}";
};
}
|