diff --git a/vms/home-assistant/default.nix b/vms/home-assistant/default.nix index ef3ad3b..17ad40c 100644 --- a/vms/home-assistant/default.nix +++ b/vms/home-assistant/default.nix @@ -2,10 +2,39 @@ { services.home-assistant = { enable = true; - configDir = "/var/lib/microvms/home-assistant"; + configDir = "/var/lib/hass"; + # disables config generation, i don't wanna configure home assistant # through nix at the moment config = null; + + extraComponents = [ + "esphome" + "met" + "radio_browser" + ]; + + extraPackages = python3Packages: with python3Packages; [ + getmac + ]; + }; + + systemd.tmpfiles.rules = [ + # configures the config directory to be mounted + # correclty with the right permissions + "z /var/lib/hass 0755 hass hass -" + "z /var/lib/hass/lost+found 0755 hass hass -" + ]; + + networking = { + nftables.enable = true; + + firewall = { + enable = true; + allowedTCPPorts = [ + 8123 + ]; + }; }; users.users.nixos = {