Setup a wiki.js instance for TransPlace
Similarly to the redis instance, TransPlace is rather annoying to run
services on. Therefore, I have offered to run this on nix until such a
time as Cleo figures out how to set this up on pterodactyl
Change-Id: Iceff9c46e34201968f8e7b097267641499417b57
Reviewed-on: https://git.clicks.codes/c/Infra/NixFiles/+/632
Reviewed-by: Samuel Shuert <coded@clicks.codes>
Tested-by: Skyler Grey <minion@clicks.codes>
diff --git a/modules/common/postgres.nix b/modules/common/postgres.nix
index 7955bc2..5e07c4b 100644
--- a/modules/common/postgres.nix
+++ b/modules/common/postgres.nix
@@ -15,7 +15,17 @@
log_destination = lib.mkForce "syslog";
};
- ensureDatabases = [ "vaultwarden" "gerrit" "privatebin" "keycloak" "nextcloud" "synapse" "taiga" "jinx" ];
+ ensureDatabases = [
+ "vaultwarden"
+ "gerrit"
+ "privatebin"
+ "keycloak"
+ "nextcloud"
+ "synapse"
+ "taiga"
+ "jinx"
+ "wiki"
+ ];
ensureUsers = [
{
@@ -52,6 +62,10 @@
name = "jinx";
ensureDBOwnership = true;
}
+ {
+ name = "wiki";
+ ensureDBOwnership = true;
+ }
] ++ (map (name: ({
inherit name;
})) [ "minion" "coded" "pineafan" ]);
@@ -107,6 +121,10 @@
user = "jinx";
passwordFile = config.sops.secrets.clicks_jinx_db_password.path;
}
+ {
+ user = "wiki";
+ passwordFile = config.sops.secrets.clicks_wiki_db_password.path;
+ }
] [
(map (userData: ''
$PSQL -tAc "ALTER USER ${userData.user} PASSWORD '$(cat ${userData.passwordFile})';"
@@ -136,6 +154,7 @@
"clicks_nextcloud_db_password"
"clicks_taiga_db_password"
"clicks_jinx_db_password"
+ "clicks_wiki_db_password"
] [
(map (name: {
inherit name;