diff --git a/common/packages.nix b/common/packages.nix index 8141b25f..691b2d21 100644 --- a/common/packages.nix +++ b/common/packages.nix @@ -57,6 +57,7 @@ inputs @ { inherit (pkgs.dig) dnsutils; inherit (pkgs) + arp-scan openssh rsync wget diff --git a/devices/homie/modules/home-assistant/assist.nix b/devices/homie/modules/home-assistant/assist.nix index 19967ce4..c4b169d7 100644 --- a/devices/homie/modules/home-assistant/assist.nix +++ b/devices/homie/modules/home-assistant/assist.nix @@ -15,6 +15,7 @@ inherit (self.legacyPackages.${pkgs.system}.hass-components) extended-ollama-conversation + tuya-local ; }; diff --git a/flake.lock b/flake.lock index 37c3e24e..eaa607ec 100644 --- a/flake.lock +++ b/flake.lock @@ -1587,6 +1587,7 @@ "trash-d-src": "trash-d-src", "treefmt-nix": "treefmt-nix_2", "ts-for-gir-src": "ts-for-gir-src", + "tuya-local-src": "tuya-local-src", "vimplugin-easytables-src": "vimplugin-easytables-src", "vimplugin-ts-error-translator-src": "vimplugin-ts-error-translator-src", "wakewords-src": "wakewords-src" @@ -1845,6 +1846,22 @@ "type": "github" } }, + "tuya-local-src": { + "flake": false, + "locked": { + "lastModified": 1727703516, + "narHash": "sha256-M1dDkY3ev0wVMHT/klHH33SezGuP2wek9pS0YnyRxxw=", + "owner": "make-all", + "repo": "tuya-local", + "rev": "f6245ff4d5a9888c8313c1adef4411057d1754e4", + "type": "github" + }, + "original": { + "owner": "make-all", + "repo": "tuya-local", + "type": "github" + } + }, "umu": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index b85a2f21..160c1cf9 100644 --- a/flake.nix +++ b/flake.nix @@ -416,6 +416,12 @@ repo = "ts-for-gir"; type = "github"; }; + tuya-local-src = { + flake = false; + owner = "make-all"; + repo = "tuya-local"; + type = "github"; + }; vimplugin-easytables-src = { flake = false; owner = "Myzel394"; diff --git a/inputs.nix b/inputs.nix index f713604b..1203779e 100644 --- a/inputs.nix +++ b/inputs.nix @@ -192,6 +192,10 @@ let owner = "TheNimaj"; repo = "extended_ollama_conversation"; } + { + owner = "make-all"; + repo = "tuya-local"; + } { name = "spotifyplus-src"; owner = "thlucas1"; diff --git a/legacyPackages/hass-components/default.nix b/legacyPackages/hass-components/default.nix index c9ccc817..8c84ece6 100644 --- a/legacyPackages/hass-components/default.nix +++ b/legacyPackages/hass-components/default.nix @@ -19,5 +19,6 @@ pkgs.lib.makeScope pkgs.newScope (hass: let hass.callPackage file (inputs // extraArgs // {}); in { extended-ollama-conversation = buildHassComponent ./extended-ollama-conversation {}; + tuya-local = buildHassComponent ./tuya-local {}; spotifyplus = buildHassComponent ./spotifyplus {python3Packages = spotPython3Packages;}; }) diff --git a/legacyPackages/hass-components/tuya-local/default.nix b/legacyPackages/hass-components/tuya-local/default.nix new file mode 100644 index 00000000..53010744 --- /dev/null +++ b/legacyPackages/hass-components/tuya-local/default.nix @@ -0,0 +1,22 @@ +{ + tuya-local-src, + buildHomeAssistantComponent, + python3Packages, + ... +}: let + inherit (builtins) fromJSON readFile; + + manifest = fromJSON (readFile "${tuya-local-src}/custom_components/tuya_local/manifest.json"); +in + buildHomeAssistantComponent { + owner = "make-all"; + + inherit (manifest) domain version; + + src = tuya-local-src; + + propagatedBuildInputs = with python3Packages; [ + tinytuya + tuya-device-sharing-sdk + ]; + }