summaryrefslogtreecommitdiff
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/immich.nix8
1 files changed, 5 insertions, 3 deletions
diff --git a/services/immich.nix b/services/immich.nix
index b00f47c..d691a9b 100644
--- a/services/immich.nix
+++ b/services/immich.nix
@@ -1,4 +1,4 @@
-{ auxiliaryPkgs, ... }:
+{ me, auxiliaryPkgs, ... }:
let
inherit (auxiliaryPkgs) common;
@@ -54,7 +54,9 @@ in
[ "/etc/localtime" "/etc/localtime:ro" ]
[ "${immichDir}/upload" "/usr/src/app/upload" ]
];
- ports = [ immichLocalPort ];
+ # expose through tailscale, so it can be accessed both through
+ # reverse proxy, and directly from a tailnet device.
+ ports = [ (common.tailnetPort me immichLocalPort) ];
};
db = {
@@ -96,7 +98,7 @@ in
enableACME = true;
forceSSL = true;
locations."/" = {
- proxyPass = "http://localhost:${toString immichLocalPort}";
+ proxyPass = "http://${me.tailscale.ip}:${toString immichLocalPort}";
proxyWebsockets = true;
};
};