diff --git a/services/home-assistant/default.nix b/services/home-assistant/default.nix index 7fc5426..f43a0c5 100644 --- a/services/home-assistant/default.nix +++ b/services/home-assistant/default.nix @@ -1,10 +1,14 @@ -{ config, pkgs, ... }: - -with pkgs; +{ config, pkgs, inputs, ... }: let port = config.services.home-assistant.config.http.server_port; in { - imports = [ ./esphome.nix ]; + disabledModules = [ "services/home-automation/home-assistant.nix" ]; + + imports = [ + "${inputs.nixpkgs-unstable}/nixos/modules/services/home-automation/home-assistant.nix" + ./wyoming.nix + ./esphome.nix + ]; # just installed for ConBee firmware updates # TODO deconz package is currently broken @@ -26,10 +30,13 @@ in { services.home-assistant = { enable = true; + package = pkgs.unstable.home-assistant; openFirewall = true; extraComponents = [ "default_config" "otp" + "assist_pipeline" + "wyoming" "esphome" "homekit_controller" "fritz" @@ -65,6 +72,7 @@ in { database_path = "/var/lib/hass/zigbee.db"; zigpy_config = { ota = { ikea_provider = true; }; }; }; + conversation = { intents = { }; }; alarm_control_panel = [{ platform = "manual"; code = "!secret alarm_code"; diff --git a/services/home-assistant/wyoming.nix b/services/home-assistant/wyoming.nix index c7bb15e..9b69b4f 100644 --- a/services/home-assistant/wyoming.nix +++ b/services/home-assistant/wyoming.nix @@ -1,38 +1,39 @@ -{ inputs, ... }: +{ pkgs, inputs, ... }: { - # TODO they don't exist, so not disabling them - /* disabledModules = [ - "services/audio/wyoming/piper.nix" - "services/audio/wyoming/faster-whisper.nix" - ]; - */ - - # TODO fails with infinite recursion, why? - # TODO perhaps because of the `pkgs.unstable` override? imports = [ "${inputs.nixpkgs-unstable}/nixos/modules/services/audio/wyoming/piper.nix" "${inputs.nixpkgs-unstable}/nixos/modules/services/audio/wyoming/faster-whisper.nix" - ]; - /* services.wyoming.piper.servers = { - "en" = { - enable = true; - voice = "en_GB-alba-medium"; - uri = "tcp://0.0.0.0:10200"; - speaker = 0; - }; - }; + nixpkgs.overlays = [ + (final: prev: { + inherit (pkgs.unstable) wyoming-piper wyoming-faster-whisper piper-tts; + }) + ]; - services.wyoming.faster-whisper.servers = { - "tiny-en" = { - enable = true; - model = "tiny-int8"; - language = "en"; - uri = "tcp://0.0.0.0:10300"; - device = "cpu"; - }; - }; - */ + services.wyoming.piper = { + servers = { + "en" = { + enable = true; + # see https://github.com/rhasspy/rhasspy3/blob/master/programs/tts/piper/script/download.py + voice = "en-gb-southern_english_female-low"; + uri = "tcp://0.0.0.0:10200"; + speaker = 0; + }; + }; + }; + + services.wyoming.faster-whisper = { + servers = { + "en" = { + enable = true; + # see https://github.com/rhasspy/rhasspy3/blob/master/programs/asr/faster-whisper/script/download.py + model = "tiny-int8"; + language = "en"; + uri = "tcp://0.0.0.0:10300"; + device = "cpu"; + }; + }; + }; }