From 658d1e9fb833b3a3b4413e696bc0d29a2025db66 Mon Sep 17 00:00:00 2001 From: Joel Grunbaum <joelgrun@gmail.com> Date: Sat, 19 Jul 2025 22:08:04 +0000 Subject: [PATCH] No need to install nixos modules --- nixos/home-assistant.nix | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 55 insertions(+), 1 deletions(-) diff --git a/nixos/home-assistant.nix b/nixos/home-assistant.nix index 666a2b4..5c95894 100644 --- a/nixos/home-assistant.nix +++ b/nixos/home-assistant.nix @@ -1,6 +1,23 @@ { config, libs, pkgs, modulesPath, ... }: +let + unstable = import <nixos-unstable> {}; +in { + nixpkgs.overlays = [ + (self: super: { + inherit (unstable) home-assistant; + }) + ]; + + disabledModules = [ + "services/home-automation/home-assistant.nix" + ]; + + imports = [ + <nixos-unstable/nixos/modules/services/home-automation/home-assistant.nix> + ]; + services.home-assistant = { enable = true; extraComponents = [ @@ -13,10 +30,12 @@ # Recommended for fast zlib compression # https://www.home-assistant.io/integrations/isal "isal" - "zha" + "mqtt" "plex" "braviatv" "roku" + "unifi" + "generic_thermostat" ]; config = { # Includes dependencies for a basic setup @@ -32,6 +51,41 @@ }; }; }; + + services.mosquitto = { + enable = true; + listeners = [ + { + acl = [ "pattern readwrite #" ]; + omitPasswordAuth = true; + settings.allow_anonymous = true; + } + ]; + }; + + services.zigbee2mqtt = { + enable = true; + settings = { + homeassistant = true; + permit_join = true; + mqtt = { + base_topic = "zigbee2mqtt"; + server = "mqtt://127.0.0.1:1883"; + }; + serial = { + port = "/dev/ttyUSB0"; + adapter = "ember"; + }; + frontend = { + enabled = true; + port = 18080; + host = "0.0.0.0"; + }; + }; + }; + +# networking.firewall.allowedTCPPorts = [ 18080 ]; + services.nginx.virtualHosts."home.ush.bouncr.xyz" = { extraConfig = '' proxy_buffering off; -- Gitblit v1.10.0