Update immich; Add config; Fix ML not reachable from server;
This commit is contained in:
1 parent
c6e58b7cb0
commit
8a9638fbcc
3 files changed
+83
-2
No files matched your search
@@ -5,7 +5,7 @@ let
|
|||||||
rootCfg = config.selfhosted.immich;
|
rootCfg = config.selfhosted.immich;
|
||||||
cfg = rootCfg.ml;
|
cfg = rootCfg.ml;
|
||||||
hostDataPath = "${common.dataDir}/immich";
|
hostDataPath = "${common.dataDir}/immich";
|
||||||
version = "v3.1.0";
|
version = "v3.3.5";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.selfhosted.immich.ml = {
|
options.selfhosted.immich.ml = {
|
||||||
@@ -25,6 +25,7 @@ in
|
|||||||
];
|
];
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network=${common.network.name}"
|
"--network=${common.network.name}"
|
||||||
|
"--network-alias=${cfg.name}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,90 @@
|
|||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
rootCfg = config.selfhosted.immich;
|
rootCfg = config.selfhosted.immich;
|
||||||
|
cfg = rootCfg.ml;
|
||||||
|
domain = config.sops.placeholder."domains/serv";
|
||||||
|
mailDomain = "${config.selfhosted.mail.stalwart.subdomain}.${domain}";
|
||||||
|
pocketIdDomain = "${config.selfhosted.pocket-id.subdomain}.${domain}";
|
||||||
|
smtpUser = "noreply@${domain}";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = mkIf rootCfg.enable {
|
config = mkIf rootCfg.enable {
|
||||||
sops.templates."immich.env".content = ''
|
sops.templates."immich.env".content = ''
|
||||||
DB_PASSWORD=${config.sops.placeholder."immich/db_password"}
|
DB_PASSWORD=${config.sops.placeholder."immich/db_password"}
|
||||||
|
IMMICH_CONFIG_FILE=/app/immich-config.json
|
||||||
|
'';
|
||||||
|
|
||||||
|
sops.templates."immich-config.json".content = ''
|
||||||
|
{
|
||||||
|
"backup": {
|
||||||
|
"database": {
|
||||||
|
"cronExpression": "0 */4 * * *",
|
||||||
|
"enabled": true,
|
||||||
|
"keepLastAmount": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notifications": {
|
||||||
|
"smtp": {
|
||||||
|
"enabled": true,
|
||||||
|
"from": "${smtpUser}",
|
||||||
|
"replyTo": "",
|
||||||
|
"transport": {
|
||||||
|
"host": "${mailDomain}",
|
||||||
|
"ignoreCert": false,
|
||||||
|
"username": "${smtpUser}",
|
||||||
|
"password": "${config.sops.placeholder."vaultwarden/smtp_password"}",
|
||||||
|
"secure": true,
|
||||||
|
"port": 465
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth": {
|
||||||
|
"enabled": true,
|
||||||
|
"clientId": "immich",
|
||||||
|
"clientSecret": "${config.sops.placeholder."immich/client_secret"}",
|
||||||
|
"autoLaunch": true,
|
||||||
|
"autoRegister": true,
|
||||||
|
"buttonText": "Login with Pocket-ID",
|
||||||
|
"defaultStorageQuota": 1,
|
||||||
|
"issuerUrl": "https://${pocketIdDomain}",
|
||||||
|
"roleClaim": "immich_role",
|
||||||
|
"storageQuotaClaim": "immich_quota"
|
||||||
|
},
|
||||||
|
"passwordLogin": {
|
||||||
|
"enabled": true
|
||||||
|
},
|
||||||
|
"machineLearning": {
|
||||||
|
"enabled": true,
|
||||||
|
"availabilityChecks": {
|
||||||
|
"enabled": true,
|
||||||
|
"interval": 30000,
|
||||||
|
"timeout": 2000
|
||||||
|
},
|
||||||
|
"clip": {
|
||||||
|
"enabled": true,
|
||||||
|
"modelName": "ViT-B-32__openai"
|
||||||
|
},
|
||||||
|
"duplicateDetection": {
|
||||||
|
"enabled": true,
|
||||||
|
"maxDistance": 0.01
|
||||||
|
},
|
||||||
|
"facialRecognition": {
|
||||||
|
"enabled": true,
|
||||||
|
"modelName": "buffalo_l",
|
||||||
|
"maxDistance": 0.5,
|
||||||
|
"minFaces": 3,
|
||||||
|
"minScore": 0.7
|
||||||
|
},
|
||||||
|
"ocr": {
|
||||||
|
"enabled": true,
|
||||||
|
"modelName": "ESLAV__PP-OCRv5_mobile",
|
||||||
|
"maxResolution": 736,
|
||||||
|
"minDetectionScore": 0.5,
|
||||||
|
"minRecognitionScore": 0.8
|
||||||
|
},
|
||||||
|
"urls": ["http://${cfg.name}:3003"]
|
||||||
|
}
|
||||||
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -5,7 +5,7 @@ let
|
|||||||
rootCfg = config.selfhosted.immich;
|
rootCfg = config.selfhosted.immich;
|
||||||
cfg = rootCfg.server;
|
cfg = rootCfg.server;
|
||||||
hostDataPath = "${common.dataDir}/immich";
|
hostDataPath = "${common.dataDir}/immich";
|
||||||
version = "v3.1.0";
|
version = "v3.3.5";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./config.nix ];
|
imports = [ ./config.nix ];
|
||||||
@@ -36,6 +36,7 @@ in
|
|||||||
volumes = [
|
volumes = [
|
||||||
"${hostDataPath}/data:/data"
|
"${hostDataPath}/data:/data"
|
||||||
"/etc/localtime:/etc/localtime:ro"
|
"/etc/localtime:/etc/localtime:ro"
|
||||||
|
"${config.sops.templates."immich-config.json".path}:/app/immich-config.json/"
|
||||||
];
|
];
|
||||||
log-driver = "journald";
|
log-driver = "journald";
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
|
|||||||
Reference in new issue
Block a user