{pkgs, config, ...}:

{
  imports = [
    ../../oci/homeassistant.nix
  ];
  services.unbound.settings.server = let
    RECORD = ".assistant. IN A 192.168.1.20";
  in {
    local-zone = [
      "assistant. static"
    ];
    local-data = [
      "'home${RECORD}'"
    ];
  };
  services.caddy.virtualHosts = {
    "http://home.assistant" = {
	    extraConfig = ''
        reverse_proxy 127.0.0.1:8123
      '';           
    };
  };
}
