This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

machines.coaxmetal.hermes: enable home assistant plugin

+48 -1
+48 -1
machines/coaxmetal/hermes.nix
··· 124 124 pkgs.openssh 125 125 ]; 126 126 127 + # Home Assistant (styx, configs/hass) left hermes core for the 128 + # `homeassistant` catalog plugin: the ha_* tools plus a gateway platform 129 + # for state-change events. Pinned to the sha plugin-catalog/homeassistant.yaml 130 + # ships; its only Python dependency, aiohttp, is already in the venv via 131 + # the "matrix" group. HASS_TOKEN comes from hermes-env. 132 + # 133 + # The flake builds hermes as version 0.0.0 (pyproject.toml; no release 134 + # version is stamped), so the plugin's `requires_hermes: ">=0.21.5"` gate 135 + # refused to load it. The pinned hermes-agent input already has Home 136 + # Assistant moved out of core (hermes_cli/left_core_migration.py), so the 137 + # gate is met in substance; drop it. 138 + extraPlugins = [ 139 + (pkgs.applyPatches { 140 + name = "homeassistant"; 141 + src = pkgs.fetchFromGitHub { 142 + owner = "NousResearch"; 143 + repo = "hermes-homeassistant"; 144 + rev = "ba30cb0cf86c52bdb5cde98974bc062e97966529"; 145 + hash = "sha256-Pg4smvkiVpmcmUola0rziMBfq5V7UjzX8864Dem76pI="; 146 + }; 147 + postPatch = '' 148 + sed -i '/^requires_hermes:/d' plugin.yaml 149 + ''; 150 + }) 151 + ]; 152 + # Non-bundled plugins are opt-in. The module links the plugin as 153 + # plugins/nix-managed-homeassistant, but the left-core migration only 154 + # recognizes plugins/homeassistant: without the marker it would see 155 + # HASS_TOKEN, call the plugin missing, and warn on every start that it 156 + # cannot fetch it (lazy installs are off in the sealed venv). 157 + settings.plugins.enabled = [ "homeassistant" ]; 158 + settings._left_core_installed = [ "homeassistant" ]; 159 + 127 160 settings.model = { 128 161 # Claude Opus 5.5 on lass's Claude subscription: the anthropic provider 129 162 # takes the `claude setup-token` OAuth token (sk-ant-oat…) from ··· 401 434 CALDAV_USER = "hermes"; 402 435 CALDAV_CALENDAR_URL = "https://cal.lassul.us/lass/calendar/"; 403 436 437 + # Home Assistant on styx, over retiolum (configs/hass opens 8123 there). 438 + HASS_URL = "http://styx.r:8123"; 439 + 404 440 # Element makes DMs end-to-end encrypted by default, so the bot must do 405 441 # E2EE or it can't read messages. The `matrix` dep group already bundles 406 442 # mautrix[encryption] (python-olm); "optional" initializes E2EE when those ··· 430 466 }; 431 467 432 468 # Secrets (MATRIX_ACCESS_TOKEN, LLAMA_API_TOKEN, API_SERVER_KEY, 433 - # EMAIL_PASSWORD) come from clan vars below, 469 + # EMAIL_PASSWORD, HASS_TOKEN) come from clan vars below, 434 470 # merged into $HERMES_HOME/.env at activation. 435 471 environmentFiles = [ 436 472 config.clan.core.vars.generators.hermes-env.files."hermes.env".path ··· 615 651 persist = true; 616 652 }; 617 653 654 + # Home Assistant long-lived access token for the homeassistant plugin 655 + # (HA profile -> Security -> Long-lived access tokens). persist=true so the 656 + # prompt value is stored once. 657 + clan.core.vars.generators.hermes-homeassistant.prompts.token = { 658 + description = "Home Assistant long-lived access token for hermes"; 659 + type = "hidden"; 660 + persist = true; 661 + }; 662 + 618 663 # Assemble the .env Hermes reads (mirrors the opencrow-env pattern). 619 664 clan.core.vars.generators.hermes-env = { 620 665 dependencies = [ ··· 624 669 "radicale-hermes" 625 670 "hermes-anthropic" 626 671 "hermes-mail" 672 + "hermes-homeassistant" 627 673 ]; 628 674 files."hermes.env" = { }; 629 675 runtimeInputs = [ pkgs.coreutils ]; ··· 635 681 CALDAV_PASSWORD=$(cat "$in"/radicale-hermes/password) 636 682 ANTHROPIC_TOKEN=$(cat "$in"/hermes-anthropic/oauth-token) 637 683 EMAIL_PASSWORD=$(cat "$in"/hermes-mail/password) 684 + HASS_TOKEN=$(cat "$in"/hermes-homeassistant/token) 638 685 EOF 639 686 ''; 640 687 };