fix(hass): homekit firewall

This commit is contained in:
arcnmx 2024-01-29 17:05:54 -08:00
parent ad78295a06
commit 53167234da
3 changed files with 11 additions and 4 deletions

View file

@ -16,9 +16,14 @@ in {
type = str;
default = config.networking.domain;
};
homekit.enable = mkEnableOption "homekit" // {
homekit = {
enable = mkEnableOption "homekit" // {
default = cfg.config.homekit or [ ] != [ ];
};
openFirewall = mkEnableOption "homekit ports" // {
default = cfg.openFirewall;
};
};
googleAssistant.enable = mkEnableOption "Google Assistant" // {
default = cfg.config.google_assistant or { } != { };
};
@ -40,7 +45,7 @@ in {
config = {
networking.firewall = mkIf cfg.enable {
allowedTCPPorts = mkIf (cfg.openFirewall && cfg.homekit.enable) (
allowedTCPPorts = mkIf (cfg.homekit.enable && cfg.homekit.openFirewall) (
map ({ port, ... }: port) cfg.config.homekit or [ ]
);

View file

@ -80,7 +80,7 @@ in {
exposed_domains = [
"scene"
"script"
"climate"
#"climate"
#"sensor"
];
entity_config = {};

View file

@ -30,6 +30,8 @@ in {
sops.defaultSopsFile = ./secrets.yaml;
services.home-assistant.homekit.openFirewall = true;
services.kanidm = {
package =
lib.warnIf