mirror of
https://github.com/nmasur/dotfiles
synced 2025-01-31 04:02:03 +00:00
24 lines
457 B
Nix
24 lines
457 B
Nix
{ 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"; } ];
|
|
}
|
|
];
|
|
}
|
|
];
|
|
};
|
|
|
|
}
|