56 lines
1.5 KiB
Nix
56 lines
1.5 KiB
Nix
{ config, containerCfg, pkgs, lib, builder, name,... }:
|
|
let
|
|
serverCfg = config.syscfg.server;
|
|
|
|
immichServerImage = pkgs.dockerTools.pullImage {
|
|
imageName = "ghcr.io/immich-app/immich-server";
|
|
imageDigest = "sha256:d5cb251d7c3bcbb8e5bb974c8de53f3e1f0efcb71e21bde1b66df872a0a2df3d";
|
|
sha256 = "0000000000000000000000000000000000000000000000000000";
|
|
};
|
|
immichMachineLearningImage = pkgs.dockerTools.pullImage {
|
|
imageName = "ghcr.io/immich-app/immich-machine-learning";
|
|
imageDigest = "sha256:4a25fdcd11c13bc33e8b4e7eef118bc23dbd4df012012ec6d7fb1eeef872ad4d";
|
|
sha256 = "0000000000000000000000000000000000000000000000000000";
|
|
};
|
|
|
|
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;
|
|
imageStream = immichServerImage;
|
|
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 {
|
|
imageStream = immichMachineLearningImage;
|
|
port = 3003;
|
|
overrides = {
|
|
volumes = [
|
|
"${serverCfg.configPath}/immich/cache:/cache"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
|
|
} |