about summary refs log tree commit diff
path: root/nix/hosts/corrino/www/photo/immich.nix
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-09-28 23:58:44 +0200
committerEmile <git@emile.space>2024-09-28 23:58:44 +0200
commit21a651a18e77d1939adbdae73505c13c3c6e0d53 (patch)
tree41f90d31c64c9d781d906f32721ed05e82daed68 /nix/hosts/corrino/www/photo/immich.nix
parent67bb9274b9846d2f1f3e55d9fa680aedb698e99e (diff)
immich
Diffstat (limited to 'nix/hosts/corrino/www/photo/immich.nix')
-rw-r--r--nix/hosts/corrino/www/photo/immich.nix29
1 files changed, 29 insertions, 0 deletions
diff --git a/nix/hosts/corrino/www/photo/immich.nix b/nix/hosts/corrino/www/photo/immich.nix
new file mode 100644
index 0000000..83dadf4
--- /dev/null
+++ b/nix/hosts/corrino/www/photo/immich.nix
@@ -0,0 +1,29 @@
+{ config, ... }:
+
+{
+  services.nginx.virtualHosts."photo.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+    locations = {
+      "/" = {
+        proxyPass = "http://${config.services.immich.host}:${toString config.services.immich.port}";
+      };
+    };
+  };
+
+	services.immich = {
+		enable = true;
+		mediaLocation = "/var/lib/immich";
+    secretsFile = config.age.secrets.immich_secrets_file.path;
+
+		host = "127.0.0.1";
+		port = config.emile.ports.immich;
+
+		machine-learning = {
+			enable = true;
+			environment = {
+				MACHINE_LEARNING_MODEL_TTL = "600";
+			};
+		};
+	};
+}