dotfiles/modules/nixos/services/immich-proxy.nix

24 lines
457 B
Nix
Raw Normal View History

2025-01-06 15:19:42 -05:00
{ config, lib, ... }:
{
options = {
immich-proxy.enable = lib.mkEnableOption "Immich proxy";
};
config = lib.mkIf config.services.immich-proxy.enable {
caddy.routes = [
{
match = [ { host = [ config.hostnames.photosProxy ]; } ];
handle = [
{
handler = "reverse_proxy";
upstreams = [ { dial = "${config.hostnames.photosBackend}:443"; } ];
}
];
}
];
};
}