2024-09-05 21:33:06 -04:00
|
|
|
{
|
2024-09-16 22:54:18 -04:00
|
|
|
pkgs,
|
2024-09-05 21:33:06 -04:00
|
|
|
self,
|
|
|
|
wakewords-src,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
imports = [
|
|
|
|
self.nixosModules.esphome-plus
|
|
|
|
self.nixosModules.wyoming-plus
|
|
|
|
];
|
|
|
|
|
|
|
|
services = {
|
|
|
|
home-assistant = {
|
2024-10-07 15:15:29 -04:00
|
|
|
package =
|
|
|
|
(pkgs.home-assistant.override {
|
|
|
|
packageOverrides = final: prev: {
|
|
|
|
# Version before HassStartTimer
|
|
|
|
home-assistant-intents = final.buildPythonPackage rec {
|
|
|
|
pname = "home-assistant-intents";
|
|
|
|
version = "2024.4.3";
|
|
|
|
format = "wheel";
|
|
|
|
disabled = final.pythonOlder "3.9";
|
|
|
|
src = final.fetchPypi {
|
|
|
|
inherit version format;
|
|
|
|
pname = "home_assistant_intents";
|
|
|
|
dist = "py3";
|
|
|
|
python = "py3";
|
|
|
|
hash = "sha256-GraYVtioKIoKlPRBhhhzlbBfI6heXAaA1MQpUqAgEDQ=";
|
|
|
|
};
|
2024-10-07 16:27:35 -04:00
|
|
|
build-system = [final.setuptools];
|
2024-10-07 15:15:29 -04:00
|
|
|
doCheck = false;
|
2024-10-07 16:27:35 -04:00
|
|
|
pytestFlagsArray = ["intents/tests"];
|
2024-10-07 15:15:29 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
.overrideAttrs {
|
|
|
|
disabledTestPaths = [
|
|
|
|
# we neither run nor distribute hassfest
|
|
|
|
"tests/hassfest"
|
|
|
|
# we don't care about code quality
|
|
|
|
"tests/pylint"
|
|
|
|
# redundant component import test, which would make debugpy & sentry expensive to review
|
|
|
|
"tests/test_circular_imports.py"
|
|
|
|
# don't bulk test all components
|
|
|
|
"tests/components"
|
|
|
|
|
|
|
|
# Make old intent version build
|
|
|
|
"tests/scripts/test_check_config.py"
|
|
|
|
"tests/test_bootstrap.py"
|
|
|
|
"tests/helpers"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-09-16 22:54:18 -04:00
|
|
|
customComponents = builtins.attrValues {
|
2024-09-19 22:16:11 -04:00
|
|
|
inherit
|
2024-11-20 15:17:55 -05:00
|
|
|
(self.scopedPackages.${pkgs.system}.hass-components)
|
2024-10-08 15:11:56 -04:00
|
|
|
extended-ollama-conversation # url is without subdirectory
|
2024-10-07 15:15:29 -04:00
|
|
|
ha-fallback-conversation
|
2024-09-30 12:06:05 -04:00
|
|
|
tuya-local
|
2024-09-19 22:16:11 -04:00
|
|
|
;
|
2024-09-16 22:54:18 -04:00
|
|
|
};
|
|
|
|
|
2024-09-05 21:33:06 -04:00
|
|
|
extraComponents = [
|
|
|
|
"esphome"
|
|
|
|
"ollama"
|
|
|
|
"wyoming"
|
2024-09-16 22:54:18 -04:00
|
|
|
"scrape"
|
2024-09-05 21:33:06 -04:00
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
|
|
|
assist_pipeline = {};
|
|
|
|
conversation = {};
|
|
|
|
media_source = {};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
wyoming = {
|
|
|
|
piper.servers."en" = {
|
|
|
|
enable = true;
|
|
|
|
uri = "tcp://127.0.0.1:10200";
|
|
|
|
|
|
|
|
# see https://github.com/rhasspy/rhasspy3/blob/master/programs/tts/piper/script/download.py
|
|
|
|
voice = "en-us-ryan-low"; # using `hfc male (medium)` in GUI
|
|
|
|
speaker = 0;
|
|
|
|
};
|
|
|
|
|
2024-09-12 18:21:31 -04:00
|
|
|
openwakeword = {
|
2024-09-05 21:33:06 -04:00
|
|
|
enable = true;
|
2024-09-12 18:21:31 -04:00
|
|
|
uri = "tcp://127.0.0.1:10400";
|
|
|
|
|
2024-09-05 21:33:06 -04:00
|
|
|
customModelsDirectories = ["${wakewords-src}/en/yo_homie"];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
esphome = {
|
|
|
|
enable = true;
|
|
|
|
address = "100.64.0.10";
|
|
|
|
port = 6052;
|
|
|
|
};
|
|
|
|
};
|
2024-09-05 22:42:17 -04:00
|
|
|
|
|
|
|
# In case tailscale is down
|
|
|
|
boot.kernel.sysctl."net.ipv4.ip_nonlocal_bind" = 1;
|
2024-09-05 21:33:06 -04:00
|
|
|
}
|