diff options
| author | Grigory Shipunov | 2025-01-21 17:39:25 +0000 |
|---|---|---|
| committer | Grisha Shipunov | 2025-01-24 22:27:05 +0100 |
| commit | 42aa8b3a7873c38a1769cef27b7215b683f25737 (patch) | |
| tree | 1fde78c8ed662834e1b1eee6032dc4ba048f779a /hosts/cloud/proxy | |
| parent | db13bc801c9cff7dc4e54e20add1a72b27edc45e (diff) | |
immich: init
Diffstat (limited to 'hosts/cloud/proxy')
| -rw-r--r-- | hosts/cloud/proxy/default.nix | 1 | ||||
| -rw-r--r-- | hosts/cloud/proxy/immich.nix | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/hosts/cloud/proxy/default.nix b/hosts/cloud/proxy/default.nix index d727f06..438e47c 100644 --- a/hosts/cloud/proxy/default.nix +++ b/hosts/cloud/proxy/default.nix @@ -3,6 +3,7 @@ imports = [ ./auth.nix ./dav.nix + ./immich.nix ]; networking.firewall.allowedTCPPorts = [ diff --git a/hosts/cloud/proxy/immich.nix b/hosts/cloud/proxy/immich.nix new file mode 100644 index 0000000..93e62d2 --- /dev/null +++ b/hosts/cloud/proxy/immich.nix @@ -0,0 +1,33 @@ +{ ... }: +{ + services.nginx.upstreams.immich = { + servers = { + "10.89.88.13:2283" = { }; + "[fd31:185d:722f::13]:2283" = { }; + }; + }; + + services.nginx.virtualHosts."immich.oxapentane.com" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://immich"; + extraConfig = '' + client_max_body_size 50000M; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_read_timeout 600s; + proxy_send_timeout 600s; + send_timeout 600s; + ''; + }; + }; +} |
