diff --git a/coredns/ngp.computer.hosts b/coredns/ngp.computer.hosts index 591cdf8..0d0b52c 100644 --- a/coredns/ngp.computer.hosts +++ b/coredns/ngp.computer.hosts @@ -1,5 +1,7 @@ 192.168.1.3 img.ngp.computer +192.168.1.3 photos.ngp.computer 192.168.1.3 misaki.ngp.computer fe80::9ab7:85ff:fe1e:dfe8 img.ngp.computer +fe80::9ab7:85ff:fe1e:dfe8 photos.ngp.computer fe80::9ab7:85ff:fe1e:dfe8 misaki.ngp.computer diff --git a/services.nix b/services.nix index 38f44f5..81dc005 100644 --- a/services.nix +++ b/services.nix @@ -321,6 +321,13 @@ in openFirewall = true; }; + services.immich = { + enable = true; + accelerationDevices = [ "/dev/dri/renderD128" ]; + mediaLocation = "/srv/shokuhou/pictures/immich"; + }; + users.users.immich.extraGroups = [ "video" "render" "nas" ]; + # Nginx Reverse SSL Proxy services.nginx = { enable = true; @@ -339,6 +346,21 @@ in locations."/".proxyPass = "http://${config.services.nix-serve.bindAddress}:${toString config.services.nix-serve.port}"; }; + virtualHosts."photos.ngp.computer" = { + enableACME = true; + forceSSL = true; + locations."/" = { + proxyPass = "http://[::1]:${toString config.services.immich.port}"; + proxyWebsockets = true; + recommendedProxySettings = true; + extraConfig = '' + client_max_body_size 50000M; + proxy_read_timeout 600s; + proxy_send_timeout 600s; + send_timeout 600s; + ''; + }; + }; virtualHosts."img.ngp.computer" = { forceSSL = true; enableACME = true;