From 21a651a18e77d1939adbdae73505c13c3c6e0d53 Mon Sep 17 00:00:00 2001 From: Emile Date: Sat, 28 Sep 2024 23:58:44 +0200 Subject: immich --- nix/hosts/corrino/www/photo/default.nix | 4 ++-- nix/hosts/corrino/www/photo/immich.nix | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 nix/hosts/corrino/www/photo/immich.nix (limited to 'nix/hosts/corrino/www/photo') 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"; + }; + }; + }; +} -- cgit 1.4.1