summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* pkgs/claude-inbox: completion: grouped by kindtv5 days1-6/+13
| | | | | | The commands, the options, REPOs, BRANCHes, in that order (complete -o nosort, where bash has it, i.e. since 4.4), as bash can't color them; and a name that's both a REPO and a BRANCH only once.
* pkgs/claude-inbox: completion: the command's options only, and not againtv5 days1-8/+19
| | | | | | Without a command, it offers the commands, but none of their options; with one, its options, and no other command; and no option that's there already, nor --pick with -f, --force, or the other way round.
* pkgs/claude-inbox: REPO, BRANCH, --COMMAND and options, in any ordertv5 days1-142/+200
| | | | | | | | | | | Commands are options now (--list, --show, --take, --push), in one set with the others, without overlaps, so only REPO and BRANCH are words, and each word is what exists: a repository in DIR, or a branch of claude's in one, the one reading of all words that does, or an error. Without REPO, BRANCH is in the one repository that has it; without a command, it's --show if there's a BRANCH, else --list. --show fetches first (REPO, or else all), --take doesn't: it takes what was shown. An option that isn't for the command is an error, not ignored.
* pkgs/claude-inbox: show --diff from HEAD, by defaulttv5 days1-13/+6
| | | | | What's checked out is what one compares with, most likely, rather than a local branch of the same name, which may well not be there.
* pkgs/claude-inbox: master tracks claude's master, if nothing elsetv5 days1-4/+13
| | | | | | | take and push push master to claude's master, always, and by name, which needs no upstream; but @{u} does (git log @{u}.., say), and master has none after take --force when the old one had none. So give it claude's then, but keep any it has already.
* configs/claude/rsync-filter: what of the claude layer's state to back uptv5 days1-0/+46
| | | | | | | | | | | | | | rsync filter rules for /home/ of a guest with configs/claude.nix: a blacklist of scratch (the remotes' tmp, never backed up, and src/tmp, for repositories not worth a backup, like third parties', symlinked from src), the claude.ai login (a secret; claude auth login again after a restore), and what's rebuildable, transient, or synced again from the account (caches, the crates cargo fetched, Claude Code's sessions, snapshots, plugins). What remains: the repositories (uncommitted files, branches only there), the remotes' directories, transcripts, memory, links to claude.ai sessions, uploads, trust and settings, and the remotes started with claude-remote. With how to use it, and how to restore.
* pkgs/claude-inbox: take --pick, for a branch behind mastertv5 days1-8/+32
| | | | | | | | The commits of BRANCH that master doesn't have yet (git cherry's +, so rebased ones master has are left out) get cherry-picked onto master, which is then pushed, like take. On a conflict, it stops there, on master: resolve, git cherry-pick --continue, then push; or --abort. Until then, push refuses: master has only some of the picks.
* pkgs/claude-inbox: take --force, an abandoned branch of its own each timetv5 days1-0/+7
| | | | | | | A second take --force within the same second found its abandoned/master-DATE taken already, and stopped (with git's error, before changing anything). Now it adds -2, -3, ... to the name, as long as that's taken.
* pkgs/claude-inbox: claude-inbox [OPTION...] [--] [REPO] COMMAND ...tv5 days1-104/+119
| | | | | | | | | | | The repository comes first now, then the command: claude-inbox REPO show [BRANCH [--diff[=WHAT]]], REPO take [-f] BRANCH, REPO push [-f], and REPO [list], which lists just REPO's branches (fetching only it). Without REPO, list is all of them, as before. list and help are commands there, anything else a REPO; after --, the next word is a REPO in any case (a repository named list, say). The old order gets told the new one. The command's own options (-f, --diff) still go anywhere after it; the completion knows all of that.
* pkgs/claude-inbox: for the host, what in the claude VM needs attentiontv5 days1-0/+300
| | | | | | | | | | | | | | | | | | | | | | | | | For each repository the VM has (ssh claude: ~/src, but for symlinks, i.e. third parties' in src/tmp), claude-inbox fetches its checkout here (in $CLAUDE_INBOX_SRC, default ~/sync/src) from the remote claude, and lists the branches there with something master doesn't have, compared by content (git cherry), so rebased ones count as merged: with their owner (the remote, by the branch's prefix, checked against the VM's ~/remotes, or tv, without one), what to do (review: it's new, on top of master; rebase: master moved on, the remote's turn; done: master has it all, to delete; yours: tv's own), what changed since show or take (*), and whether master needs pushing (or, unexpectedly, the VM's has something master doesn't). --by-remote groups by owner. show REPO BRANCH shows master..BRANCH, with patches, show REPO BRANCH --diff=WHAT the diff to it from WHAT (any branch or commit; by default, the local branch of its name without the remote's prefix: B, for REMOTE/B), and show REPO all branches, as a graph; take REPO BRANCH fast-forwards master to it and pushes master to claude, or with -f (before or after the arguments) renames master to abandoned/master-DATE, checks out BRANCH as master (with the old one's upstream), and pushes that like push -f; push REPO pushes master (with -f, a rewritten one, as long as claude's is still the one last fetched: --force-with-lease). With bash completion. A package for the host, of the claude facet's tools (the name may still change, as it might serve hermes, too).
* configs/rust: a layer with Rust, for building and testing Rust projectstv5 days1-0/+30
| | | | | | | | cargo, clippy, rustc and rustfmt from the host's nixpkgs, for every user (so in the remotes' PATH), and what crates' build scripts commonly need: nixpkgs' wrapped cc and pkg-config, and OpenSSL, with pkg-config finding the system's .pc files through PKG_CONFIG_PATH. Meant to go below the layers that change more often, as its image is big and changes rarely.
* configs/hermes: hermes.env a secret, not from /xchgtv5 days1-3/+8
| | | | | | | | hermes.env (the API key, and the Webapp's sign-in) came from /xchg, which every VM started in the same directory sees. Now it's a secret (fc.secrets."hermes.env", /run/secrets/hermes.env), which the run script requires: --secret hermes.env=FILE. (The module still copies it into ~/.hermes/.env, onto the home drive.)
* configs/claude: the system's packages in the remotes' PATHtv5 days1-1/+3
| | | | | | | The remotes' PATH had only the packages of the service's path, so fc-egress, claude-remote, and anything else installed system-wide weren't there. Now /run/current-system/sw comes after them. claude's own packages stay the service's (packages, that is, not that string).
* configs/claude: claude-remote, root's tool for the remotestv5 days2-18/+177
| | | | | | | | | | | | | | | claude-remote list (the default) shows the remotes, static, dynamic, with a unit loaded, or with a directory, with their kind, state, and whether they trust their directory yet; inspect NAME shows a remote's unit, directory, trust, claude.ai session (bridge-pointer.json), and the last lines of its terminal; start, stop and restart NAME go through systemctl (a remote started here is dynamic: it lasts until stopped here), and start points to attach while the remote doesn't trust its directory; attach [NAME] opens its terminal (it's claude-attach, which is gone); log NAME shows its journal. Which remotes are static, it asks systemd (multi-user.target's wants), so changing them doesn't change it. A package (pkgs/claude-remote.nix), with bash completion of the commands and the remotes' names.
* configs/claude: sessions named after their remotetv5 days1-0/+3
| | | | | | Remote Control names the sessions it creates after the host, by default, which all remotes share. Now it names them after the remote (CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX), NAME-...
* configs/claude: remotes started with systemctl survive rebootstv5 days1-9/+61
| | | | | | | | | | | | | | A remote started with systemctl start claude-remote-control@NAME, rather than by multi-user.target's wants, now lasts until systemctl stop, across reboots: while it's meant to run, it has a file of its name in /home/.var/lib/claude/remote-control (the claude facet's part of what would be in /var/lib, which is on the tmpfs, on the home drive; root's), written when it starts (as root: ExecStartPre=+), and removed when it stops, but not by a failure (it restarts) nor by a shutdown (ExecStopPost=+, by SERVICE_RESULT and systemctl is-system-running). At boot, claude-remote-control-restore starts them again, but for those that are static by then, whose files it removes instead; static ones never get one.
* configs/claude: remotes, contexts on the repositories in ~/srctv5 days1-27/+39
| | | | | | | | | | | | | A Remote Control server per directory meant a context per directory of repositories, so two couldn't work on the same ones. Now claude-remote-control@NAME is a remote, a context of its own: it works in ~/remotes/NAME, its project for Claude Code (sessions, memory, trust), created if need be; and every remote works on the repositories in ~/src, an additional directory for all of them, by the machine's managed settings (/etc/claude-code/managed-settings.json, which also means for any claude here, and that nobody's own settings take it away). The default remote is main (it was @src), and claude-attach's default with it.
* configs/claude: a Remote Control server per directorytv5 days1-20/+42
| | | | | | | | | | | | claude-remote-control is a template now, claude-remote-control@DIR, one per directory in ~claude, created if need be (but not ~ itself, nor anything above it, nor a dot file): @src is the one there was, and another layer can add more to multi-user.target's wants. Each runs in a tmux of its own, /run/claude/DIR/tmux, in a runtime directory of its own: a second tmux new-session in the same server would exit without a process for systemd to follow (Type=forking), and stopping a unit removes its runtime directory. claude-attach takes the DIR (default: src).
* configs/hermes: make the copies of bundled skills writabletv6 days1-0/+29
| | | | | | | | | | | | | | | | | | | Hermes copies its bundled (and optional) skills out of the store into ~/.hermes/skills with shutil.copytree, which keeps the store's modes, so the copies were read-only, files and directories: skill_manage couldn't patch a bundled skill, nor write its temporary files next to it. Patch the three places that copy a skill (seeding, updating, restoring) to make the copy writable for its owner afterwards, and copy the categories' DESCRIPTION.md without its mode. The manifest's hashes are of paths and contents only, so writable copies don't count as user-modified, and updates still replace them. Tested against the pinned source's tools/ with read-only bundled skills: seeding, an update and a restore leave nothing read-only (before: 382 paths), and nothing gets reported as user-modified. Copies made before this stay read-only; chmod -R u+w ~/.hermes/skills fixes them.
* configs/claude: require nixtv6 days1-0/+7
| | | | | | | | | | run-firecracker-vm's guests no longer have nix unless they have its nix layer (layers/nix.nix). Claude builds and tries things with it (nix-build, nix-shell), so claude asserts that it's there, as in [ layers/nix.nix configs/claude.nix ], rather than coming up without. With it, the run script requires --store, as before only for the store to persist. hermes doesn't need nix: on its own, its store is read-only.
* configs: share claude-code, for layers on top of each othertv6 days3-38/+35
| | | | | | | | | claude and hermes each had their own claude-code and unfree predicate. On top of each other, the predicates don't add up, one replaces the other, and the claudes could drift apart with the next bump. Now both import modules/claude-code.nix, which the module system takes only once: claude-code, as pkgs.claude-code (an overlay), and its unfree predicate. The package stays the same store path.
* configs: fail the services without the home drivetv6 days2-3/+14
| | | | | | | RequiresMountsFor only requires home.mount if there is one, which the fc-home generator only makes with the drive (--home): without it, the services started anyway, with their state on the tmpfs. Now they assert that /home is a mount point, and fail otherwise.
* configs: fixed uids for claude and hermestv6 days2-0/+8
| | | | | | | | The guest creates its users anew at every boot (userborn's state is on the tmpfs), so a user's uid depended on which other users there were: another layer's user could take claude's 1000, and the files on the home drive would belong to someone else. claude keeps 1000, which its files have already; hermes, and its group, get 1001.
* configs/hermes: a normal user, with a 0700 hometv6 days1-3/+16
| | | | | | | | | | hermes was the module's system user, with its home group-writable and setgid (2770), for the module's hostUsers, which aren't used here: anyone in the group could read the Claude login and hermes.env's secrets. Now it's a normal user (still in its group hermes), and its home is 0700: systemd-tmpfiles takes the first line for a path and ignores the module's (with a warning), and hermes-agent-setup undoes the module script's chmod 2770.
* configs: require --home, with hermes' home there, like claude'stv6 days2-5/+16
| | | | | | | | | | | | | | | Both layers set fc.home.required, so the run script refuses to start the guest without --home, instead of keeping the state on the tmpfs. hermes' home (stateDir) moves from the store drive to /home/hermes, where claude's is, too: the store drive is for the store, which should be fine to throw away, and the home drive keeps what can't be. Like claude's, the user's home doesn't get created with the user, as /home isn't mounted yet then; the module's tmpfiles create it, and hermes' services require the mount. To keep the existing state, once, with both drives attached: mv /nix/.rw-store/hermes /home/hermes
* configs/claude: same packages for user and servicetv6 days1-1/+1
|
* configs/claude: no telemetry, error reports, or claude.ai connectorstv6 days1-0/+9
| | | | | Denied by the egress list anyway: http-intake.logs.us5.datadoghq.com and mcp-proxy.anthropic.com.
* configs/claude.nix: inittv6 days1-0/+83
| | | | | A Claude Code Remote Control server, on the Claude subscription, running as claude in a tmux which root opens with claude-attach.
* configs/hermes: add gitMinimaltv6 days1-1/+4
|
* configs/hermes: the Claude API by default, the subscription selectabletv6 days1-3/+13
| | | | | | | | | | | | | | | | | | Using the Claude subscription from Hermes, even through the official claude CLI, is at best a gray area of Anthropic's terms, while an API key from the Console organization linked to the subscription is what they provide for, and the plan's monthly API credits cover it. So the default is now Hermes' own anthropic provider with Claude Opus 5.5, and ANTHROPIC_API_KEY from hermes.env in the host's xchg, which the setup merges into ~/.hermes/.env already. The subscription plugin stays installed, selectable with /model or hermes model. Without an API key, the anthropic provider would borrow the claude.ai login in ~/.claude and send it passing itself off as Claude Code. That login is claude's, for the plugin, so turn the borrowing off (auth.adopt_external_logins); claude reads it itself, so the plugin keeps working.
* configs/hermes: don't attach root's login shell to hermes' tmuxtv6 days1-8/+4
| | | | | | Root's login shell ran hermes-attach, which starts hermes' tmux, and root logs in automatically on the console. Root attaches with hermes-attach when it wants to.
* configs/hermes: socket-activate hermes' tmux, clean plugin copiestv6 days1-8/+22
| | | | | | | | | | | | | | | | hermes-tmux.service started at boot and restarted hermes whenever it quit, and as its RuntimeDirectory, /run/hermes went away whenever it stopped, so attaching failed with "error creating /run/hermes/tmux". Now hermes-tmux.socket holds /run/hermes/tmux, and the first client starts tmux (-D, on systemd's socket), whose config starts hermes in session hermes. Quitting hermes ends the session, and with exit-empty the server and the service, until the next client. Detaching doesn't. Hermes imports provider plugins from copies under ~/.hermes/runtime/provider-plugins, a set per process, reclaimed by later processes. Copies of the read-only plugin from before couldn't be removed, and crashes leave theirs: remove them all at boot, before any Hermes runs.
* configs/hermes: no second timestamp in the gateway's journal linestv6 days1-5/+15
| | | | | | | The gateway formats its stderr log lines with a timestamp of their own, which journald adds anyway. Patch hermes-agent's source to leave it out when stderr is the journal (JOURNAL_STREAM is set); the log files in ~/.hermes/logs keep theirs.
* configs/hermes: let model changes lasttv6 days1-0/+13
| | | | | | | | | Managed (HERMES_MANAGED, or the module's .managed marker), Hermes refuses to save config.yaml at all, so /model --global and hermes model couldn't keep a change; only session-only /model worked. Set HERMES_MANAGED=false, which wins over the marker, for the gateway, the tmux and hermes' shells, and make config.yaml writable for hermes. The settings here still replace their keys in config.yaml at every boot.
* configs/hermes: serve the Webapp, for the hosttv7 days1-0/+11
| | | | | | | | The gateway serves the Webapp, Hermes Desktop in a browser, on port 9120. Bound to 0.0.0.0, so the host can reach it at the guest's address, which needs the dashboard's sign-in: username, password (or its hash) and a token-signing secret, as HERMES_DASHBOARD_BASIC_AUTH_* in hermes.env in the host's xchg, merged into ~/.hermes/.env at boot.
* configs/hermes: start the TUI in the tmuxtv7 days1-1/+1
| | | | | The classic CLI takes every Enter on the console as a newline, so there was no way to send; the TUI (hermes --tui) sends.
* configs/hermes: claude 2.1.329, from npm's platform packagetv7 days1-9/+8
| | | | | | | 2.1.329 isn't in nixpkgs master's manifest yet. npm's platform package @anthropic-ai/claude-code-linux-x64 has the release's plain binary, and the registry gives its integrity hash, so take it from there: no zstd, and no checksum to copy from elsewhere.
* configs/hermes: claude 2.1.328, as the plugin's models need 2.1.280tv7 days1-1/+18
| | | | | | | | | The plugin's requests failed: "Claude Code 2.1.223 does not support this model; version 2.1.280 or newer is required". nixos-26.05 has 2.1.223. Override its claude-code with 2.1.328, version and checksum from nixpkgs master's manifest. Release binaries are zstd-compressed now, which 26.05's installPhase doesn't expect, so decompress them first. x86_64-linux only, like the checksum.
* configs/hermes: fetch with fetchFromGitHub instead of builtins.fetchTarballtv7 days1-11/+16
| | | | | | The sources of hermes-agent, its flake inputs and the provider plugin now come from fixed-output derivations. Their store paths are the same as before, as name and hash are.
* configs/hermes: install the provider plugin as a writable copytv7 days1-9/+20
| | | | | | | | | | | | | | | Hermes knew the plugin (hermes plugins list) but not its provider. Hermes imports a provider plugin from a snapshot: it copies the plugin with shutil.copytree, modes included, and renames the copy from a temporary directory into its place. Moving a directory to another parent needs write permission on the directory itself, for its "..", so with extraPlugins' symlink into the store, the copy is read-only, the rename fails with EACCES for hermes (root could), and Hermes only logs "Could not stage provider plugin". Install a writable copy in hermes-agent-setup instead. extraPlugins' old symlink goes away there, too, as the module removes nix-managed-* links on each run.
* configs/hermes: add hermes-attach, root's way back into hermes' tmuxtv7 days1-2/+7
| | | | | | Root's login shell attaches to hermes' tmux, and detaching gives the shell back, but getting into the tmux again took tmux with the right socket. hermes-attach does that, and the login shell uses it, too.
* configs/hermes: put hermes into hermes' packagestv7 days1-0/+2
| | | | | So hermes is on the PATH of hermes' shells, like the ones in new windows of the tmux, and not only of the units.
* configs/hermes: use the Claude subscription through claudetv7 days1-8/+19
| | | | | | | | | | | | Replace the anthropic provider, with its API key from /xchg, by the Claude Subscription DirectSDK plugin from hermes-official-plugins. It runs each turn through the claude CLI, from nixpkgs' claude-code, and has no credentials of its own: log in once with claude auth login as hermes, e.g. in a new window of the tmux. The login goes to ~/.claude, i.e. into stateDir, so it lasts as long as the rest of the state. The plugin needs Hermes 0.21.4, or main from 118984d7a02f on, which the pinned revision includes.
* configs/hermes: keep perl out of the closuretv7 days1-0/+14
| | | | | | | | | profiles/perlless forbids perl in the system closure, and hermes-agent brought it in twice: nixpkgs' git (send-email, gitweb & co.), on the package's runtime PATH and the module's unit PATH, and wl-clipboard, whose xdg-utils needs perl. Override the package with gitMinimal and without wl-clipboard, which has no use without Wayland, and replace the unit's PATH, as the package brings git itself.
* configs/hermes: don't patch nixos-26.05's patchelftv7 days1-2/+9
| | | | | | | hermes-agent patches patchelf for a bug of 0.19 (NixOS/patchelf#674). nixos-26.05's patchelf is 0.15, which doesn't have that bug, and the patch fails to apply to it. Make overrideAttrs a no-op on a patchelf older than 0.19, in the pkgs only hermes-agent's flake sees.
* configs/hermes: make hermes-agent evaluate with nixos-26.05tv7 days1-1/+7
| | | | | | | | | | | nixos-26.05's fetchPnpmDeps calls pnpm.override for a pnpm >= 11, to rebuild its nodejs-slim with a pinned SQLite. hermes-agent passes its pinned pnpm 12, a plain attrset carrying nixpkgs' nodejs-slim, which has no override. Give it one, in the pkgs only hermes-agent's flake sees. This evaluates, but the build is untested: the pinned SQLite may make the pnpm deps' fixed-output hash differ from hermes-agent's. With nixos-unstable the overlay changes no derivation.
* configs/hermes: build hermes-agent with the system's nixpkgstv7 days1-11/+37
| | | | | | | | | | | | flake-compat evaluates hermes-agent's flake with the nixpkgs locked in its flake.lock, nixos-unstable. Instead, call the flake and its inputs directly, with this system's pkgs as nixpkgs, which all of them follow anyway. The other inputs are still fetched as locked. The NixOS module is imported from its file, as the flake's nixosModules.default needs pkgs, which imports can't use. hermes-agent targets nixos-unstable: with nixos-26.05, evaluation fails in fetchPnpmDeps, which expects a pnpm it can override.
* configs/hermes: run hermes as hermes in a tmux, attach as roottv7 days1-7/+24
| | | | | | | | The console is root's again. hermes runs as hermes in a tmux started by hermes-tmux.service, and root's login shell attaches to it; detaching gives root's shell back. tmux lets root attach to another user's server. Quitting hermes ends the session, and systemd starts a new one.
* configs/hermes: use hermes on the console as hermes, not roottv7 days1-3/+6
| | | | | | | The console logs in as hermes instead of root, and the hermes CLI goes into that user's packages instead of the system's. The user's home is the service's stateDir, so the CLI finds the service's state at ~/.hermes without HERMES_HOME set system-wide.
* configs/hermes: add Hermes Agenttv7 days1-0/+50
Hermes Agent from its own NixOS module, imported through flake-compat, with what this guest needs on top: - nixos-init doesn't run activation scripts, so the module's setup runs as hermes-agent-setup.service before the gateway - state lives on the rw-store drive, as /var is a tmpfs - the hermes user doesn't linger, as users.manageLingering is off (hermes' cron needs a user manager; nothing else does) The API key comes from /xchg/hermes.env.