diff options
| author | Mel <einebeere@gmail.com> | 2024-12-09 02:37:40 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-12-09 02:37:40 +0100 |
| commit | 5ac307b7bc51f8f94b7a7c10ec978bc302e8b303 (patch) | |
| tree | 11fa3fe8c7042b5f086623b1967d138dc13c7a26 /services/immich.nix | |
| parent | 674b9449b58d52bd54bf688a9f1c736219f37011 (diff) | |
| download | network-5ac307b7bc51f8f94b7a7c10ec978bc302e8b303.tar.zst network-5ac307b7bc51f8f94b7a7c10ec978bc302e8b303.zip | |
Also expose raw Immich port to tailnet
Signed-off-by: Mel <einebeere@gmail.com>
Diffstat (limited to 'services/immich.nix')
| -rw-r--r-- | services/immich.nix | 8 |
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; }; }; |
