add immich
This commit is contained in:
parent
77e83981d7
commit
3ee42ca4f3
2 changed files with 22 additions and 2 deletions
|
|
@ -1,3 +1,19 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
|
users.users.immich.extraGroups = [ "video" "render" ];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
immich = {
|
||||||
|
enable = true;
|
||||||
|
port = 2283;
|
||||||
|
host = "127.0.0.1";
|
||||||
|
mediaLocation = "/var/lib/immich";
|
||||||
|
accelerationDevices = null;
|
||||||
|
machine-learning.enable = true;
|
||||||
|
};
|
||||||
|
immich-public-proxy = {
|
||||||
|
enable = true;
|
||||||
|
port = 2284;
|
||||||
|
immichUrl = "http://localhost:2283";
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -44,10 +44,14 @@ in {
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
basicAuthFile = if cfg.auth then "/var/lib/nginx/.htpasswd" else null;
|
basicAuthFile = if cfg.auth then "/var/lib/nginx/.htpasswd" else null;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
|
proxy_set_header X-Auth-User $remote_user;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_set_header X-Auth-User $remote_user;
|
client_max_body_size 50000M;
|
||||||
|
proxy_read_timeout 600s;
|
||||||
|
proxy_send_timeout 600s;
|
||||||
|
send_timeout 600s;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}) proxy-mappings;
|
}) proxy-mappings;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue