Files
nixos/home/modules/herdr-runtime.nix
T
oqyude 2ab48515b9
test-runner / smoke (push) Canceled after 0s
fix(home): add nodejs_22 to herdr-runtime.nix (herdr-web-ui preflight)
После feat(essentials): enable programs.nix-ld, bun-runtime plugin install
прошёл дальше preflight — теперь падает на следующем шаге: «herdr web ui
needs Node 18 or newer for its terminal sidecar, and 'node' is not on the
PATH of the shell that started herdr».

preflight.sh плагина проверяет `node --version` на PATH. На sapphira
node уже был через opencode.nix home.packages (там же, где раньше был
bun — мы его оттуда убрали в прошлом рефакторе). На rydiwo opencode
не подключён, и node отсутствовал.

Добавляю pkgs.nodejs_22 в home.modules.herdr-runtime.nix — это тот же
пакет, что используется в opencode.nix (consistency, один major). На
sapphira он уже был через opencode; home.packages мерджит и дедуплицирует,
так что лишней копии не будет.
2026-10-15 15:33:33 +03:00

34 lines
2.0 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# `pkgs.bun` для пользовательского PATH.
#
# Зачем отдельный модуль: на sapphira bun исторически приходил через
# `home/modules/opencode.nix` (opencode.nix:339 — для `omo doctor` и
# standalone-вызовов bun/npm/npx в shell); на rydiwo opencode не
# подключали, и bun отсутствовал — herdr-web-ui plugin пытался
# auto-скачать generic-linux bun в
# `~/.local/share/herdr-web-ui/install.<hash>/runtime/bin/bun`, тот
# динамически слинкован и не запускается на NixOS («NixOS cannot run
# dynamically linked executables intended for generic linux
# environments out of the box»).
#
# Теперь это **единственный источник** `pkgs.bun` для пользовательского
# PATH: импортируется и в `home/server.nix` (sapphira), и в
# `home/secondary.nix` (rydiwo). `opencode.nix` оставляет bun только в
# `programs.opencode.extraPackages` (для `--suffix PATH` opencode-wrapped
# env), но не дублирует в `home.packages`.
#
# Note: bun **внутри opencode-wrapped env** (extraPackages в opencode.nix)
# не дублирует и не заменяет bun в shell — это две разные PATH-модификации,
# и opencode-wrapped уже тянет bun из shell PATH через `--suffix PATH`,
# но extraPackages делает это явно для воспроизводимости.
{
pkgs,
...
}:
{
# nodejs_22 нужен herdr-web-ui plugin'у — preflight.sh его плагина
# проверяет `node --version` на PATH и отказывается ставить, если
# node < 18 отсутствует («herdr web ui needs Node 18 or newer for its
# terminal sidecar»). На sapphira node уже был через opencode.nix, на
# rydiwo нет — добавляем сюда, чтобы plugin-install прошёл preflight.
home.packages = with pkgs; [ bun nodejs_22 ];
}