From 09a74648a1a799bf2c282a735bc24ec13fe08c29 Mon Sep 17 00:00:00 2001
From: Fabian Montero <fabian@posixlycorrect.com>
Date: Fri, 24 Jan 2025 11:59:23 -0600
Subject: [PATCH] vps: reduce immich worker concurrency

---
 sys/platforms/vps/srv/immich.nix | 40 ++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/sys/platforms/vps/srv/immich.nix b/sys/platforms/vps/srv/immich.nix
index 9aadc3d..1fb0fc8 100644
--- a/sys/platforms/vps/srv/immich.nix
+++ b/sys/platforms/vps/srv/immich.nix
@@ -28,6 +28,46 @@ with lib; {
       environment = {
         IMMICH_TELEMETRY_EXCLUDE = "host,api,io,repo,job";
       };
+      settings = {
+        machineLearning = {
+          enabled = false;
+        };
+        job = {
+          backgroundTask = {
+            concurrency = 1;
+          };
+          smartSearch = {
+            concurrency = 1;
+          };
+          metadataExtraction = {
+            concurrency = 1;
+          };
+          faceDetection = {
+            concurrency = 1;
+          };
+          search = {
+            concurrency = 1;
+          };
+          sidecar = {
+            concurrency = 1;
+          };
+          library = {
+            concurrency = 1;
+          };
+          migration = {
+            concurrency = 1;
+          };
+          thumbnailGeneration = {
+            concurrency = 1;
+          };
+          videoConversion = {
+            concurrency = 1;
+          };
+          notifications = {
+            concurrency = 1;
+          };
+        };
+      };
     };
   };
 }