about summary refs log tree commit diff
path: root/nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix')
-rw-r--r--nix/hosts/corrino/secrets/immich_secrets_file.age8
-rw-r--r--nix/hosts/corrino/www/photo/default.nix4
-rw-r--r--nix/hosts/corrino/www/photo/immich.nix29
3 files changed, 39 insertions, 2 deletions
diff --git a/nix/hosts/corrino/secrets/immich_secrets_file.age b/nix/hosts/corrino/secrets/immich_secrets_file.age
new file mode 100644
index 0000000..dc6f4d0
--- /dev/null
+++ b/nix/hosts/corrino/secrets/immich_secrets_file.age
@@ -0,0 +1,8 @@
+age-encryption.org/v1
+-> ssh-ed25519 gvwQ2Q a/2aGjjMuB8ZavRVGvFWQCJGG8EPMn+8KdoEJuH+BCg
+AfFZCaaUh72+DJjQRCpOvW439iZZkropLolAKJ71Nd0
+-> ssh-ed25519 m8VklA 3CP4YOShkTL3kmfESVwSl3rNVc4K1r4QxWfadSjqfWc
+QLtyqSi8SYFOKgZRgT8xMTF75c4/mkvCExLTMAerq68
+--- l78EoBYR9V8gQGv/6/4/SQ5LSRhx3KXa2/S8ny5ftvE
+Hޖrr8`/oJ_Z3xAS4)zʲ$S IC0MH
+LyF˼9/w
\ No newline at end of file
diff --git a/nix/hosts/corrino/www/photo/default.nix b/nix/hosts/corrino/www/photo/default.nix
index 46266ae..9d7d4f5 100644
--- a/nix/hosts/corrino/www/photo/default.nix
+++ b/nix/hosts/corrino/www/photo/default.nix
@@ -2,7 +2,7 @@
 
 {
   imports = [
-    ./photoprism.nix
-    # ./immich.nix
+    # ./photoprism.nix
+    ./immich.nix
   ];
 }
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";
+			};
+		};
+	};
+}