Add redis for TransPlace logger
As getting the TransPlace logger up is time-critical and pterodactyl is not
playing nice with redis, I have agreed to host a redis server for TransPlace
until they get one of their own.
This should eventually be moved to the TransPlace server.
Change-Id: I3df59385a9f038d2d822239d7294dfc6f6bcfc24
Reviewed-on: https://git.clicks.codes/c/Infra/NixFiles/+/631
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/common/transplace-logger.nix b/modules/common/transplace-logger.nix
new file mode 100644
index 0000000..e467db5
--- /dev/null
+++ b/modules/common/transplace-logger.nix
@@ -0,0 +1,20 @@
+{ config, ... }: {
+ services.redis.servers."transplace-logger" = {
+ enable = true;
+
+ openFirewall = true;
+
+ bind = "0.0.0.0";
+ port = 6379;
+
+ requirePassFile = config.sops.secrets.transplace_logger_redis_password.path;
+ };
+
+ sops.secrets.transplace_logger_redis_password = {
+ mode = "0600";
+ owner = config.users.users.root.name;
+ group = config.users.users.root.group;
+ sopsFile = ../../secrets/transplace-logger.json;
+ format = "json";
+ };
+}