{ config, lib, ... }: let inherit (lib) mkIf; cfg = config.pepe.services.homeassistant; in { options.pepe.services.homeassistant = with lib; { enable = mkEnableOption "Enable Home Assistant"; domain = mkOption { type = types.str; default = null; }; }; config = mkIf cfg.enable { pepe.core.vhost.hosts.${cfg.domain} = { locations."/" = { host = "10.0.0.251"; port = 8123; allowLAN = true; allowVPN = true; allowWAN = true; proxyWebsockets = true; }; }; }; }