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";
+  };
+}
diff --git a/secrets/transplace-logger.json b/secrets/transplace-logger.json
new file mode 100644
index 0000000..b6b5ac1
--- /dev/null
+++ b/secrets/transplace-logger.json
@@ -0,0 +1,32 @@
+{
+	"transplace_logger_redis_password": "ENC[AES256_GCM,data:crExDPYvXyXFhN9TFpodu9+8YbQ=,iv:yFSVFi6UG0uw4PxIpWpQsZqXYQP5tZI/vPgbd5uIdmI=,tag:a9XzAJTeY9Z0uQl5oavkEg==,type:str]",
+	"sops": {
+		"kms": null,
+		"gcp_kms": null,
+		"azure_kv": null,
+		"hc_vault": null,
+		"age": [
+			{
+				"recipient": "age15mv77dpnh5762gk5rsw2u79uza4tg8cu6r3nlwjudlzmdqqck3ss6mg9dy",
+				"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWTTJaaUwyS3RjcUQzVk5I\nTFJ2MUhtb2ZNYklRWmFiS05STTJUZ0U0QTBJCk42QnVTQ0JoOHNTK2hQYUVLbXg0\nWStycTJxNkFXSkQ3dzRadUJnTm5FZFkKLS0tIDZtUDZkUU1tSng3TWlnTlVwZnJZ\nNHlIbTVhL0hOTW1UY1FuQmVod2owTHMKNSrUK3VaM/7YKgdEzNanY7IVc3BXn5o4\nAtM6XD3wFQn8eFzl+qgwcUG/E46Zu5YgSo1t5uVbZIWrAn9LJUnnMA==\n-----END AGE ENCRYPTED FILE-----\n"
+			},
+			{
+				"recipient": "age1m7k864feyuezllp2hj4edkccn36rthrvfw969j6f0l3c0mhh5emsnfx6pd",
+				"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBqWEVQTkVBSlk2Nldvam4y\nTWtEQ1NqeUlIK2J3MWxQYWxFODQ4dzdzblFBCjA3OHlVRkhpc281MDZzZCtTWnBw\ncnJ3UlZxUDQraXlvWGNjc2ZGZTZPQWsKLS0tIFFJYXllbHJRdi9VemlxMDd1MDZB\nT3dwL1pYZXdQZkFia0pDQ1kwQkxIM3cKQ3jkDLEg9MRFbK+JAET1yfsgRIeAiDhN\nBHzMcTuM9GevRQfsPcX0KJZ3Wt6AFDaV2W56gtNwunYoA9yc7C8xcQ==\n-----END AGE ENCRYPTED FILE-----\n"
+			},
+			{
+				"recipient": "age1fxxnmkeuqhhct93c43pwkzhuzzq8857s5hye6pgfpku70kjn4ecqtamfqr",
+				"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxVXVqekwzR0gzR0VKSmJh\namppd2NqMExqemxBSksyQmpFcW5SRy8wc0NFCjZIR2hueUVMbzZvRm9LY2RmTjdE\nb0dtN09EL2puQ0FwN3ZsbGFhb2VmQ1UKLS0tIE9iWlBsdnV1UGM2d0tJY0QvR2RH\nUldvWVlVQlVoL0VLM3Bpc1dnUGlRUTgKM+PAOjmaZ2WYqLdAy7udqLE8OE3lOUWh\nC9m83Ix1qXFtt3kfjsu6+2uFAVnm2vdBk1Harqnj51wZvRmIPu2fhA==\n-----END AGE ENCRYPTED FILE-----\n"
+			},
+			{
+				"recipient": "age1zunqahfz404x7v8x0gs4hv5kq2xlyvqmukhlwvpymj74805jcunq4r7ugv",
+				"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB3L2FOSEMxbG0wVm8waVVp\nd2d6S0xDeXlPVGxwY3dIeFV2ZVYwb3c0WVIwCjRpVEZGQWJkUk5ibk1rYnVjNGJm\nUUdQWTFLSFROcC91NGNZRi9OUU5wTGMKLS0tIGE1QjR3aENtL2NSSHp3NU5BQlov\neTlHaGFaT2dUd1NmZnNXTHNTekVGUlkK9+R1VwuBl0bDQgSFkVetfLnWMOHbO9ab\n/ZkTAbjGy4+vIQT6D7usIlag0bg5YYUT3yZeZz4BuJbGMSu4fYdvYw==\n-----END AGE ENCRYPTED FILE-----\n"
+			}
+		],
+		"lastmodified": "2024-04-19T00:10:45Z",
+		"mac": "ENC[AES256_GCM,data:FXallWjtZjUDkkKA/+jtuIX/mJo7RTPlBvJTqfXZuQgUcEl7sjiyLhhkI44qUGbHPOwbM+FrKOB3ho024qQKEkdpXXFxRd+TK8eG8tHrGlwFfGB7aw1gHhYUR4ybobmJ/Q0oKreapK0SHGrKpp1CUEBt/trtAkEj358FtVYxI/M=,iv:8uX4ChWfZuh1txeyDE9KVUon/CmbK3aVpvpno9dvLaY=,tag:djUA8uF+YN2hETsm9BeJkA==,type:str]",
+		"pgp": null,
+		"unencrypted_suffix": "_unencrypted",
+		"version": "3.8.1"
+	}
+}
\ No newline at end of file