nixos/home-assistant: open firewall ports for homekit component (#529038)
This commit is contained in:
@@ -864,12 +864,19 @@ in
|
||||
|
||||
networking.firewall.allowedTCPPorts = mkMerge [
|
||||
(mkIf cfg.openFirewall [ cfg.config.http.server_port ])
|
||||
(mkIf cfg.openFirewallForComponents
|
||||
(mkIf cfg.openFirewallForComponents (
|
||||
# https://www.home-assistant.io/integrations/homekit/#firewall
|
||||
optionals (useComponent "homekit") [ 21063 ]
|
||||
# https://www.home-assistant.io/integrations/sonos/#network-requirements
|
||||
(optionals (useComponent "sonos") [ 1400 ])
|
||||
)
|
||||
++ optionals (useComponent "sonos") [ 1400 ]
|
||||
))
|
||||
];
|
||||
|
||||
networking.firewall.allowedUDPPorts = mkIf cfg.openFirewallForComponents (
|
||||
# https://www.home-assistant.io/integrations/homekit/#firewall
|
||||
optionals (useComponent "homekit") [ 5353 ]
|
||||
);
|
||||
|
||||
# symlink the configuration to /etc/home-assistant
|
||||
environment.etc = mkMerge [
|
||||
(mkIf (cfg.config != null && !cfg.configWritable) {
|
||||
|
||||
Reference in New Issue
Block a user