From 9769c631604d478b4923feba18e81fde09871159 Mon Sep 17 00:00:00 2001 From: death916 Date: Thu, 15 May 2025 12:14:12 +0000 Subject: [PATCH] ha unstable --- modules/home-assistant.nix | 24 +++++++++++++++++++++--- modules/home-assistant.nix.save | 11 +++++++++++ 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 modules/home-assistant.nix.save diff --git a/modules/home-assistant.nix b/modules/home-assistant.nix index e47b991..f59e3af 100644 --- a/modules/home-assistant.nix +++ b/modules/home-assistant.nix @@ -1,16 +1,34 @@ +# /home/death916/nixconfig/modules/home-assistant.nix +{ config, pkgs, lib, unstablePkgsHA, ... }: # Added unstablePkgsHA + { services.home-assistant = { enable = true; + package = unstablePkgsHA.home-assistant; # Use HA package from unstable + extraComponents = [ - # Components required to complete the onboarding "esphome" "met" "radio_browser" ]; config = { - # Includes dependencies for a basic setup - # https://www.home-assistant.io/integrations/default_config/ default_config = {}; + homeassistant = { + name = "Homelab HA (Unstable)"; + + time_zone = "America/Los_Angeles"; + }; + # Add other integrations as needed }; }; + + # Firewall rule for Home Assistant + networking.firewall.allowedTCPPorts = [ 8123 ]; + + # Ensure the `hass` user has access to necessary devices (e.g., Zigbee/Z-Wave dongles) + users.users.hass.extraGroups = lib.mkIf (config.services.home-assistant.enable) [ + "dialout" # Common group for serial devices + # Add other groups if needed + ]; + } diff --git a/modules/home-assistant.nix.save b/modules/home-assistant.nix.save new file mode 100644 index 0000000..cb50eca --- /dev/null +++ b/modules/home-assistant.nix.save @@ -0,0 +1,11 @@ +{ + services.home-assistant = { + enable = true; + extraComponents = [ + # Components required to complete the onboarding + "esphome" + "met" + "radio_browser" + ]; + config = { + # Includes dependencies for a basic setup