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: {
|
|
|
|
# Needed for spotifyplus
|
|
|
|
inherit (self.packages.${pkgs.system}) urllib3;
|
|
|
|
|
|
|
|
# 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=";
|
|
|
|
};
|
|
|
|
build-system = [
|
|
|
|
final.setuptools
|
|
|
|
];
|
|
|
|
doCheck = false;
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"intents/tests"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
.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
|
|
|
|
(self.legacyPackages.${pkgs.system}.hass-components)
|
|
|
|
extended-ollama-conversation
|
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
|
|
|
}
|