Commit Graph
36 Commits
Author SHA1 Message Date
oqyude 27138b2660 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-19 18:23:19 +03:00
oqyude c309e187e8 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 + новый модуль).
2026-10-19 18:23:19 +03:00
oqyude c9a6c29f04 fix(home): add pkgs.bun to rydiwo home packages (herdr-web-ui runtime)
На сапфире pkgs.bun приходит через импорт ./modules/opencode.nix
(opencode.nix:271,339). На rydiwo opencode.nix не подключали — bun в
PATH нет, поэтому herdr-web-ui plugin при первой попытке стартовать
на rydiwo скачивает generic-linux bun в
~/.local/share/herdr-web-ui/install.<hash>/runtime/bin/bun, и тот
спотыкается о динамический линкер NixOS:
«Could not start dynamically linked executable: ... NixOS cannot run
dynamically linked executables intended for generic linux
environments out of the box.»

Один-в-один одна. С pkgs.bun в PATH plugin находит системный
/nix/store/...-bun-*/bin/bun и не пытается скачивать свой.
2026-10-19 18:23:18 +03:00
oqyude 989f93bf9b feat(home): add herdr import to rydiwo config (multi-host bridge)
rydiwo's home/secondary.nix now imports home/modules/herdr.nix so the
herdr systemd user service (server --session herdr-prod) is installed
declaratively via Nix instead of relying on scp'd files on rydiwo's
working tree (intent-to-add state from the metaagent-director-2026-10-15
session). Once this lands on gitea/dev, deploy-rs pulls it and applies
home.packages = [ pkgs.herdr ] + the systemd user unit through
home-manager activation, so 'herdr --machine rydiwo' on sapphira no
longer depends on a manually-provisioned binary on rydiwo.

T22 acceptance: home/secondary.nix committed + gitea/dev updated; the
existing scp'd copy on rydiwo becomes redundant and will be subsumed
by the next 'deploy .#rydiwo' run.
2026-10-19 18:23:18 +03:00
oqyude 5c6c28f380 feat(home): add herdr user service + herdr.zeroq.su vhost
Per-UID design of herdr (Unix sockets, no HTTP) drove the home-manager
choice over a NixOS module — mirrors the existing opencode-web pattern.

  - home/modules/herdr.nix: new systemd user service running
    herdr 0.9.3 on sapphira, --session herdr-prod,
    EnvironmentFile from sops opencode_server. 2G/4G cgroup caps,
    Restart=always (mitigates herdr#4920).
  - modules/server/nginx.nix: herdr.zeroq.su vhost with Authelia
    forward-auth (wildcard *.zeroq.su policy already covers it).
    Upstream 127.0.0.1:7317 is the Bun server from the
    devswha/herdr-web-ui plugin (970star, MIT) — vhost 502s until
    'herdr plugin install devswha/herdr-web-ui' runs.
  - modules/server/coredns.nix: 192.168.1.20 herdr.zeroq.su A record.
  - home/server.nix: import the new module.
2026-10-19 18:23:18 +03:00
oqyude 762275fdd3 opencode: remove opencode-loop plugin
Reverts the plugin registration added in 4ff7188 ("opencode:
opencode-loop added"). The entry had to be dropped from both places
inside programs.opencode, otherwise the plugin keeps loading in the
TUI:

  settings.plugin -> ~/.config/opencode/opencode.json
  tui.plugin      -> ~/.config/opencode/tui.json

oh-my-openagent is untouched; its agent and category overrides in
~/.omo/omo.jsonc still apply.
2026-10-19 18:23:18 +03:00
oqyude 09412b8bdb nix flake update 2026-10-19 18:23:17 +03:00
oqyude 13552039c7 opencode: opencode fix 2026-10-13 04:33:47 +03:00
oqyude 4ff7188678 opencode: opencode-loop added 2026-10-13 03:46:43 +03:00
oqyude 02927a26bb vtimeline added and formatted 2026-10-09 16:59:45 +03:00
oqyude bc5aad87da opencode remapping 2026-10-09 16:38:16 +03:00
oqyude e7c0fde0b1 tty added and opencode fixed 2026-10-09 14:48:12 +03:00
oqyude 5e9641602a opencode: dynamic HM symlink, env via xlib, document migration journal
Three small things together:

1. relinkHomeManager was pinning the versioned symlink name to
   'home-manager-24-link'. That breaks on every HM major-version bump:
   HM 25 will move the alias to 'home-manager-25-link' and the script
   will silently stop relinking. Derive the name from one hop of the
   stable 'home-manager' symlink, with a guard against the missing case
   so a fallback never accidentally rewrites the profiles/ directory
   itself.

2. programs.opencode.web.environmentFile now reads from
   xlib.dirs.opencode-server-env (added previously in users.nix + dirs.nix).
   The sops materialization and the systemd EnvironmentFile can no
   longer silently desync.

3. Document the oh-my-openagent 2026-07-opencode-config-unification
   migration trap that logs 'Migration backup path already exists' on
   every startup: the backup path embeds the content-hashed store path,
   which stays valid in /nix/store across HM activations, so the
   deterministic collision never resolves itself. Recovery is
   'rm -rf ~/.omo/migration-backup-*' to let omo retry; if it keeps
   failing on the same path the plugin version probably expects a new
   schema and this file needs changes.

Also trim the over-explained [Service] / serviceConfig comment: the
home-manager attrset-union behavior is general, not specific to this
unit, so the explanation got shorter without losing the invariant.
2026-10-07 11:38:16 +03:00
oqyude c73a698857 opencode fix linger 2026-10-04 22:27:55 +03:00
oqyude cc20ee637d opencode oom fixes 2026-10-04 17:41:32 +03:00
oqyude fb56f6310b opencode 2026-10-03 20:21:19 +03:00
oqyude 958247b22c soft coding 2026-10-02 23:05:00 +03:00
oqyude d49fd5a358 big refactoring 2026-10-01 14:16:17 +03:00
oqyude 482d32e1a6 microfix 2026-09-02 13:35:58 +03:00
oqyude 411c118500 br v4 2026-08-11 22:13:53 +03:00
oqyude 056e5895fe br v3 2026-08-11 04:03:42 +03:00
oqyude 843f0bafa1 br v2 2026-08-11 03:05:52 +03:00
oqyude 871fad26d4 big refactoring 2026-08-11 02:31:00 +03:00
oqyude 5f6288bd15 unused code 2026-08-08 17:48:43 +03:00
oqyude caad27900b termux: declarative ~/.ssh/config + termux-api package
- home/termux.nix: programs.ssh.settings with the 7 known hosts
  (replaces hand-copied ~/.ssh/config; ssh aliases z-s/z-st/z-o/z-ot
  removed, lamet/pubray-1 kept since they have no Host entry)
- modules/termux/termux-api.nix: build termux-api 0.59.1 (cmake,
  am resolved from PATH, shebangs fixed); adds termux-battery-status,
  termux-notification, termux-clipboard-*, etc. Needs the Termux:API
  Android app (com.termux.api from F-Droid) as the actual backend
- mobile.nix: enable android-integration.am (termux-am backend for am)
2026-08-07 19:28:29 +03:00
oqyude d5d62393e3 termux: create .nix-defexpr/channels/nixpkgs/.keep via activation (home-manager cannot link into symlinked dir) 2026-08-07 03:35:19 +03:00
oqyude 58c6e5d48e termux: drop tailscaled (cannot run in proot, SELinux netlink), export SVDIR=/etc/service in zshenv 2026-08-07 03:31:06 +03:00
oqyude 566bc12f00 supervisor termux 2026-08-07 03:03:47 +03:00
oqyude bc9b2dc792 sshd setup for termux 2026-08-07 01:38:46 +03:00
oqyude af90756661 termux setup 2026-08-06 22:57:19 +03:00
oqyude 6b426eaa55 add termux device type with shared home-manager userspace module 2026-08-06 17:53:11 +03:00
oqyude 1d84fb7354 nix flake update 2026-05-02 11:27:32 +03:00
oqyude c8c7c68c04 some fix 2026-03-27 17:56:12 +03:00
oqyude ce19d10585 try to setup tuckr 2026-03-16 18:21:24 +03:00
oqyude af373baecc refind is rofl
121

1

12

12

1

12

12

12

1

asd
2026-03-09 22:07:18 +03:00
oqyude f1a81a6408 Init 2026-03-09 10:50:12 +03:00