NixOS/system/services/caddy.nix

21 lines
381 B
Nix
Raw Normal View History

2024-06-13 13:52:45 +07:00
{ config, lib, ... }:
let
cfg = config.profile.services.caddy;
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
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
};
}