From fd339edcdca47a09dcb8b56e5e6e382b01c39d97 Mon Sep 17 00:00:00 2001 From: mikl Date: Thu, 10 Sep 2026 13:54:33 +0300 Subject: [PATCH] remove pi-web --- hosts/heather/arion-compose.nix | 4 --- hosts/heather/caddy.nix | 14 ---------- hosts/heather/default.nix | 1 - hosts/heather/pi-web.nix | 48 --------------------------------- hosts/poppy/default.nix | 11 -------- 5 files changed, 78 deletions(-) delete mode 100644 hosts/heather/pi-web.nix diff --git a/hosts/heather/arion-compose.nix b/hosts/heather/arion-compose.nix index cbc717d..02874dc 100644 --- a/hosts/heather/arion-compose.nix +++ b/hosts/heather/arion-compose.nix @@ -39,10 +39,6 @@ let icon: matrix.png href: https://admin.iscg.dev description: Matrix admin room UI - - Pi Web: - icon: /images/pi.png - href: https://pi.iscg.dev - description: pi coding agent web UI - Communication: - Tuwunel: icon: matrix.png diff --git a/hosts/heather/caddy.nix b/hosts/heather/caddy.nix index 2be8c7a..9397782 100644 --- a/hosts/heather/caddy.nix +++ b/hosts/heather/caddy.nix @@ -19,14 +19,6 @@ let # (на heather: nix-shell -p caddy --run 'caddy hash-password ...') # Защищает syncthing GUI снаружи (GUI слушает только 127.0.0.1:8384, # Caddy проксирует sync.iscg.dev + basicauth). - # pi-web basicauth. Пароль в pass iscg.dev/pi-web/auth (plaintext). - # Hash сгенерить на heather: nix-shell -p caddy --run 'caddy hash-password --plaintext ...' - piBasicAuth = '' - basicauth { - mikl $2a$14$yqYiMGLvtPs0sLRZhu1/VOfiRO.CARIBcGGrFpo4iwOd9s4o4IVCy - } - ''; - syncBasicAuth = '' basicauth { mikl $2a$14$ozHN9/aa4VhPX43NN8MKdODKvOoJ5MBpOUFhzkxwvb58ZI5b6eqEK @@ -119,12 +111,6 @@ Allow: /" 200 reverse_proxy 127.0.0.1:3002 ''; - # pi-web (web UI для pi coding agent) - # basicauth защищает весь vhost включая SSE /api/agent — leak нет. - "pi.iscg.dev".extraConfig = piBasicAuth + '' - reverse_proxy 127.0.0.1:30141 - ''; - # paseo daemon endpoint для desktop/mobile-клиентов. # Basic Auth здесь намеренно нет: мобильный клиент Paseo его не умеет. # Доступ защищён встроенным PASEO_PASSWORD самого демона. diff --git a/hosts/heather/default.nix b/hosts/heather/default.nix index 0120156..ce18786 100644 --- a/hosts/heather/default.nix +++ b/hosts/heather/default.nix @@ -20,7 +20,6 @@ ./caddy.nix # edge proxy, TLS, роутинг по доменам ./syncthing.nix # sync + relay ./tuwunel-admin.nix # matrix admin web UI (systemd, статический бинарник) - ./pi-web.nix # pi-web (web UI для pi coding agent, systemd + npm global) ./paseo.nix # paseo daemon (web UI для CLI-агентов, systemd + npm global) ./mesh-clients.nix # Sol-style client pool (wg-clients1) ./mesh-egress.nix # Sol-style selected-destination egress policy diff --git a/hosts/heather/pi-web.nix b/hosts/heather/pi-web.nix deleted file mode 100644 index d8de312..0000000 --- a/hosts/heather/pi-web.nix +++ /dev/null @@ -1,48 +0,0 @@ -# heather — pi-web (web UI для pi coding agent). -# -# https://github.com/agegr/pi-web, npm-пакет @agegr/pi-web -# Next.js 16 + lobehub-ui. Читает ~/.pi/agent/sessions/*.jsonl напрямую, -# общается с pi через RPC (spawn бинаря pi). НЕ демон — запускается как -# systemd-сервис, который держит next-server на 127.0.0.1. -# -# Слушает 127.0.0.1:30141 → Caddy pi.iscg.dev терминирует TLS + basicauth -# (см. caddy.nix, piBasicAuth). Auth-пароль в pass iscg.dev/pi-web/auth. -# -# Установка pi и pi-web — ручная (npm global в ~/.npm-global, НЕ в nix store): -# npm config set prefix ~/.npm-global -# npm i -g @earendil-works/pi-coding-agent @agegr/pi-web -# Это разовая операция на хосте (как tuwunel-admin бинарник вне nix-store). -# nodejs ставим через systemPackages — нужен и для npm, и для next-server. - -{ config, pkgs, lib, ... }: -{ - # Node.js: нужен для pi-web (next-server) и для spawn'а pi из pi-web. - environment.systemPackages = [ pkgs.nodejs ]; - - systemd.services.pi-web = { - description = "pi-web (web UI for pi coding agent)"; - after = [ "network-online.target" ]; - wants = [ "network-online.target" ]; - wantedBy = [ "multi-user.target" ]; - - # PATH: nodejs (node/npm) + ~/.npm-global/bin (где лежат pi и pi-web). - path = [ pkgs.nodejs "/home/mikl/.npm-global/bin" ]; - - environment = { - # Где pi-web ищет sessions/pi-конфиг. Совпадает с ~/.pi/agent на heather. - PI_CODING_AGENT_DIR = "/home/mikl/.pi/agent"; - HOME = "/home/mikl"; - NODE_ENV = "production"; - }; - - serviceConfig = { - Type = "simple"; - User = "mikl"; - Group = "users"; - ExecStart = "/home/mikl/.npm-global/bin/pi-web --hostname 127.0.0.1 --port 30141"; - WorkingDirectory = "/home/mikl"; - Restart = "on-failure"; - RestartSec = 5; - }; - }; -} diff --git a/hosts/poppy/default.nix b/hosts/poppy/default.nix index 4eee9c8..54f508f 100644 --- a/hosts/poppy/default.nix +++ b/hosts/poppy/default.nix @@ -3,17 +3,6 @@ networking.hostName = "poppy"; - # Локальное короткое имя pi -> 127.0.0.1 для pi-web. - # Запуск: npm exec @agegr/pi-web@latest --hostname 0.0.0.0 --port 30141 - # Ссылка: http://pi:30141 - # (networking.hosts в nix-darwin отсутствует; /etc/hosts правится - # идемпотентно через extraActivation — один из хуков, реально - # вызываемых в activate-скрипте.) - system.activationScripts.extraActivation.text = '' - if ! grep -qE '^[0-9.]+[[:space:]]+pi($|[[:space:]])' /etc/hosts; then - printf '127.0.0.1\tpi # pi-web local alias\n' >> /etc/hosts - fi - ''; system.primaryUser = "mikl"; system.stateVersion = 7;