refactor(home): extract pkgs.bun into herdr-runtime.nix, drop duplication
Раньше bun для пользовательского shell PATH приходил двумя путями:
на sapphira — через opencode.nix:339 (home.packages=[... pkgs.bun ...]),
на rydiwo — добавлен вручную в home/secondary.nix (commit ffd85dc) для
herdr-web-ui plugin'а, который без bun в PATH скачивает generic-linux
runtime и ломается о NixOS dynamic linker.
Теперь:
• home/modules/herdr-runtime.nix — единый источник pkgs.bun для
пользовательского PATH (импортируется и в server.nix, и в
secondary.nix).
• home/secondary.nix — добавлен импорт herdr-runtime.nix, убран
прямой home.packages = with pkgs; [ bun ]; и его 10-строчный
комментарий-объяснение (переехал в herdr-runtime.nix).
• home/server.nix — добавлен импорт herdr-runtime.nix.
• home/modules/opencode.nix — pkgs.bun удалён из home.packages
(он теперь из herdr-runtime.nix), но ОСТАВЛЕН в
programs.opencode.extraPackages (line 271) — это другой PATH
(--suffix PATH внутри opencode-wrapped env), не дубликат.
Результат для обоих хостов:
- shell PATH: bun из /nix/store/...-bun-*/bin/bun
- opencode-wrapped env (только sapphira): bun через extraPackages
- herdr-web-ui plugin auto-install на rydiwo: находит bun в PATH,
не скачивает generic-linux runtime
После этого оба хоста пересобираются (sapphira: opencode/server.nix;
rydiwo: secondary.nix + новый модуль).
This commit is contained in:
1 parent
c9a6c29f04
commit
c309e187e8
4 files changed
+38
-11
No files matched your search
@@ -331,12 +331,17 @@ in
|
||||
xdg.configFile."opencode/oh-my-openagent.json".text = builtins.toJSON ohMyOpenagentConfig;
|
||||
|
||||
# Same extras on the user's PATH too, so `omo doctor` and standalone invocations
|
||||
# of `sg`, `gh`, `bun`, `npm`, `npx` work in the user's shell — not only inside
|
||||
# of `sg`, `gh`, `npm`, `npx` work in the user's shell — not only inside
|
||||
# the opencode-wrapped binary.
|
||||
#
|
||||
# Note: `pkgs.bun` deliberately NOT included here — it now lives in
|
||||
# `home/modules/herdr-runtime.nix`, which both `home/server.nix` and
|
||||
# `home/secondary.nix` import. Avoids a second copy of bun in the
|
||||
# user's shell PATH (single source of truth) and means the bun-runtime
|
||||
# fix for the herdr-web-ui plugin on NixOS is one place to grep.
|
||||
home.packages = [
|
||||
pkgs.nodejs_22
|
||||
astGrepWithSg
|
||||
pkgs.bun
|
||||
pkgs.gh
|
||||
];
|
||||
|
||||
|
||||
Reference in new issue
Block a user