{ config, containerCfg, pkgs, lib, builder, name,... }: let version = "v2"; serverCfg = config.syscfg.server; in { sops = true; db = true; paths = [{ path = "${serverCfg.configPath}/immich/cache"; mode = "0750"; }{ path = "${serverCfg.dataPath}/immich/"; mode = "0750"; }]; containers = { server = builder.mkContainer { subdomain = containerCfg.subdomain; image = "ghcr.io/immich-app/immich-server:${version}"; port = 2283; secret = name; extraEnv = { IMMICH_MACHINE_LEARNING_URL = "http://immich-ml:3003"; REDIS_HOSTNAME = builder.host; }; overrides = { volumes = [ "${serverCfg.dataPath}/immich:/usr/src/upload" ]; }; }; immich-ml = builder.mkContainer { image = "ghcr.io/immich-app/immich-machine-learning:${version}"; port = 3003; overrides = { volumes = [ "${serverCfg.configPath}/immich/cache:/cache" ]; }; }; }; }