2024-06-13 13:52:45 +07:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.profile.services.caddy;
|
2024-06-13 14:04:10 +07:00
|
|
|
inherit (lib) mkIf;
|
2024-06-13 13:52:45 +07:00
|
|
|
in
|
|
|
|
{
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
services.caddy = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2024-06-13 20:52:45 +07:00
|
|
|
|
2024-07-28 21:17:35 +07:00
|
|
|
services.caddy.virtualHosts."router.tigor.web.id".extraConfig = ''
|
|
|
|
@denied not remote_ip private_ranges
|
|
|
|
|
|
|
|
respond @denied "Access denied" 403
|
|
|
|
|
|
|
|
reverse_proxy 192.168.100.1
|
|
|
|
'';
|
2024-06-13 13:52:45 +07:00
|
|
|
};
|
|
|
|
}
|