heather: pinchtab browser control plane (chromium + user service) + pay x86_64 build

This commit is contained in:
heather 2026-09-09 17:18:40 +00:00
commit 70e95226d4
3 changed files with 40 additions and 3 deletions

View file

@ -7,6 +7,8 @@
stdenv, stdenv,
fetchurl, fetchurl,
lib, lib,
autoPatchelfHook,
openssl,
system ? builtins.currentSystem, system ? builtins.currentSystem,
}: }:
let let
@ -31,7 +33,7 @@ let
}; };
"x86_64-linux" = { "x86_64-linux" = {
name = "pay-x86_64-unknown-linux-gnu.tar.gz"; name = "pay-x86_64-unknown-linux-gnu.tar.gz";
hash = lib.fakeSha256; # fill if needed hash = "1vyf5pw4j7phyffa1aw66ms2j3r983qjj47wlsiyi0sdmwvzy9pi";
}; };
} }
.${system} or (throw "pay: no prebuilt binary for system ${system}"); .${system} or (throw "pay: no prebuilt binary for system ${system}");
@ -49,6 +51,9 @@ stdenv.mkDerivation {
sourceRoot = "."; sourceRoot = ".";
# tarball contains a single prebuilt `pay` binary at its root. # tarball contains a single prebuilt `pay` binary at its root.
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ openssl stdenv.cc.cc.lib ];
dontConfigure = true; dontConfigure = true;
dontBuild = true; dontBuild = true;

View file

@ -7,11 +7,35 @@
{ {
home.stateVersion = "25.11"; home.stateVersion = "25.11";
# Expose pi only; do not add the whole npm global bin (which also contains pi-web). # User-level tools installed outside Nix (PinchTab, pi wrapper, etc.).
home.sessionPath = [ home.sessionPath = [
"${config.home.homeDirectory}/.local/bin" "${config.home.homeDirectory}/.local/bin"
"${config.home.homeDirectory}/.local/libexec"
]; ];
# Keep the browser control plane alive across SSH logout and reboots.
# PinchTab itself is installed outside Nix because its upstream release
# binary is dynamically linked; the local NixOS-compatible build lives in
# ~/.local/libexec/pinchtab.
systemd.user.services.pinchtab = {
Unit = {
Description = "PinchTab browser control plane";
After = [ "dbus-broker.service" ];
};
Service = {
ExecStart = "%h/.local/libexec/pinchtab server";
Restart = "on-failure";
RestartSec = 5;
Environment = [
"HOME=%h"
"PATH=/run/current-system/sw/bin:/home/mikl/.npm-global/bin:/home/mikl/.local/bin:/home/mikl/.local/libexec"
];
};
Install = {
WantedBy = [ "default.target" ];
};
};
home.file.".local/bin/pi" = { home.file.".local/bin/pi" = {
executable = true; executable = true;
text = '' text = ''
@ -39,6 +63,7 @@
# Git # Git
git git
tea # Forgejo/Gitea CLI
# Nix # Nix
alejandra # форматтер alejandra # форматтер
@ -47,6 +72,9 @@
# Утилиты # Утилиты
delta # красивый git diff delta # красивый git diff
trash-cli # rm с корзиной trash-cli # rm с корзиной
# x402 / MPP agentic payments CLI (Solana Foundation)
(pkgs.callPackage ./pay.nix {})
]; ];
# --- FZF --- # --- FZF ---

View file

@ -28,7 +28,11 @@
# First server-to-server WireGuard backbone link: heather ↔ hyacinth. # First server-to-server WireGuard backbone link: heather ↔ hyacinth.
# The private key is generated on the live host and stays outside the flake. # The private key is generated on the live host and stays outside the flake.
environment.systemPackages = [ pkgs.wireguard-tools ]; # Chromium для PinchTab: отдельный headless-браузер для agent automation.
environment.systemPackages = [
pkgs.wireguard-tools
pkgs.chromium
];
# NixOS uses scripted networking here (not systemd-networkd), so create the # NixOS uses scripted networking here (not systemd-networkd), so create the
# dummy identity interface through a small idempotent systemd unit. # dummy identity interface through a small idempotent systemd unit.