summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2024-12-09 02:37:40 +0100
committerMel <einebeere@gmail.com>2024-12-09 02:37:40 +0100
commit5ac307b7bc51f8f94b7a7c10ec978bc302e8b303 (patch)
tree11fa3fe8c7042b5f086623b1967d138dc13c7a26
parent674b9449b58d52bd54bf688a9f1c736219f37011 (diff)
downloadnetwork-5ac307b7bc51f8f94b7a7c10ec978bc302e8b303.tar.zst
network-5ac307b7bc51f8f94b7a7c10ec978bc302e8b303.zip
Also expose raw Immich port to tailnet
Signed-off-by: Mel <einebeere@gmail.com>
-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;
};
};