{ flake, ... }:
let
  inherit (flake.config.services) instances;

  service = instances.caddy;
in
{
  services.caddy = {
    enable = true;
  };

  networking = {
    firewall = {
      allowedTCPPorts = [
        service.ports.port0
        service.ports.port1
      ];
    };
  };
}
