mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
fix(hass): homekit firewall
This commit is contained in:
parent
ad78295a06
commit
53167234da
3 changed files with 11 additions and 4 deletions
|
|
@ -16,8 +16,13 @@ in {
|
|||
type = str;
|
||||
default = config.networking.domain;
|
||||
};
|
||||
homekit.enable = mkEnableOption "homekit" // {
|
||||
default = cfg.config.homekit or [ ] != [ ];
|
||||
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 [ ]
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ in {
|
|||
exposed_domains = [
|
||||
"scene"
|
||||
"script"
|
||||
"climate"
|
||||
#"climate"
|
||||
#"sensor"
|
||||
];
|
||||
entity_config = {};
|
||||
|
|
|
|||
|
|
@ -30,6 +30,8 @@ in {
|
|||
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
|
||||
services.home-assistant.homekit.openFirewall = true;
|
||||
|
||||
services.kanidm = {
|
||||
package =
|
||||
lib.warnIf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue