home-assistant module: add openFirewall option

wip/yesman
Robin Gloster 6 years ago
parent 72f293aa50
commit 852fa6b86f
No known key found for this signature in database
GPG Key ID: D5C458DF6DD97EDF
  1. 8
      nixos/modules/services/misc/home-assistant.nix

@ -128,9 +128,17 @@ in {
you might need to specify it in <literal>extraPackages</literal>.
'';
};
openFirewall = mkOption {
default = false;
type = types.bool;
description = "Whether to open the firewall for the specified port.";
};
};
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
systemd.services.home-assistant = {
description = "Home Assistant";
after = [ "network.target" ];

Loading…
Cancel
Save