diff --git a/hosts/alyssum/immich.nix b/hosts/alyssum/immich.nix index 8da6b00..555da39 100644 --- a/hosts/alyssum/immich.nix +++ b/hosts/alyssum/immich.nix @@ -9,11 +9,6 @@ in { settings.server.externalDomain = "https://${shareFqdn}"; }; - services.immich-public-proxy = { - enable = true; - immichUrl = "https://${fqdn}"; - }; - me.binds."/var/lib/immich" = "/flower/immich"; me.binds."/var/lib/immich/encoded-video" = "immich/encoded-video"; me.binds."/var/lib/immich/profile" = "immich/profile"; @@ -37,20 +32,4 @@ in { ''; }; }; - - services.nginx.virtualHosts."${shareFqdn}" = { - useACMEHost = "lava.moe"; - forceSSL = true; - - locations."/" = { - proxyPass = "http://[::1]:${toString config.services.immich-public-proxy.port}"; - proxyWebsockets = true; - extraConfig = '' - client_max_body_size 50000M; - proxy_read_timeout 600s; - proxy_send_timeout 600s; - send_timeout 600s; - ''; - }; - }; } diff --git a/hosts/dandelion/default.nix b/hosts/dandelion/default.nix index f65dfd1..37f2f14 100644 --- a/hosts/dandelion/default.nix +++ b/hosts/dandelion/default.nix @@ -34,6 +34,7 @@ ./filesystem.nix ./kernel.nix + ./immich-proxy.nix ./networking.nix ./nginx.nix diff --git a/hosts/dandelion/immich-proxy.nix b/hosts/dandelion/immich-proxy.nix new file mode 100644 index 0000000..037cb08 --- /dev/null +++ b/hosts/dandelion/immich-proxy.nix @@ -0,0 +1,26 @@ +{ config, ... }: +let + fqdn = "photos.lava.moe"; + shareFqdn = "memo.lava.moe"; +in { + services.immich-public-proxy = { + enable = true; + immichUrl = "https://${fqdn}"; + }; + + services.nginx.virtualHosts."${shareFqdn}" = { + useACMEHost = "lava.moe"; + forceSSL = true; + + locations."/" = { + proxyPass = "http://[::1]:${toString config.services.immich-public-proxy.port}"; + proxyWebsockets = true; + extraConfig = '' + client_max_body_size 50000M; + proxy_read_timeout 600s; + proxy_send_timeout 600s; + send_timeout 600s; + ''; + }; + }; +}