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
@@ -2,11 +2,90 @@
|
||||
with lib;
|
||||
let
|
||||
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
|
||||
{
|
||||
config = mkIf rootCfg.enable {
|
||||
sops.templates."immich.env".content = ''
|
||||
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;
|
||||
cfg = rootCfg.server;
|
||||
hostDataPath = "${common.dataDir}/immich";
|
||||
version = "v3.1.0";
|
||||
version = "v3.3.5";
|
||||
in
|
||||
{
|
||||
imports = [ ./config.nix ];
|
||||
@@ -36,6 +36,7 @@ in
|
||||
volumes = [
|
||||
"${hostDataPath}/data:/data"
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
"${config.sops.templates."immich-config.json".path}:/app/immich-config.json/"
|
||||
];
|
||||
log-driver = "journald";
|
||||
extraOptions = [
|
||||
|
||||
Reference in new issue
Block a user