summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* configs/claude: login, not between stateDir and its commenttv4 days1-4/+4
|
* configs/claude: the account's skills of no use here, offtv4 days1-1/+11
| | | | | | | | | The skills synced from the claude.ai account into ~/.claude/skills include documents (docx, pdf, pptx, xlsx, docs), browsers, desktop control, deep research and skill-creator, of no use to a remote, but listed to the model in every session: skillOverrides off in the managed settings, by each name, and as anthropic-skills:NAME, as sessions list them.
* configs/claude: the remotes' sessions named by --nametv4 days1-4/+3
| | | | | | claude remote-control --name NAME names its session in claude.ai, rather than CLAUDE_REMOTE_CONTROL_SESSION_NAME_PREFIX, the prefix of auto-generated names (NAME-...).
* pkgs/claude-remote: reset and remove, for what claude.ai deletestv4 days2-10/+144
| | | | | | | | | | | | | | Deleting a remote's session on claude.ai leaves the remote a link to it (bridge-pointer.json), which it then can't resume (404). reset NAME forgets the session: moves the link aside (bridge-pointer.json.old), and the remote starts with a new one, stopped and started again if it runs. remove NAME retires a remote: stops it, and moves its directory and Claude Code project to ~claude/remotes/.removed/NAME-DATE, worktrees in it repaired; its branches and trust stay; not for static ones. Then the old session and environment can go, on claude.ai. Both ask first (y/N), but with -f, as root, not from the remote itself, all or nothing like rename, whose take-back they share (its messages generalized). .removed is not worth a backup: in the rsync filter.
* pkgs/claude-inbox: --stack=BRANCH, to try several branches at oncetv4 days1-19/+47
| | | | | | | | | | Fetches REPO first, then puts the commits of BRANCH that HEAD doesn't have yet (by content) on top of HEAD, one by one, detached, so no branch moves, and nothing gets pushed: --take --pick onto HEAD, without the push. One --stack after the other stacks branches, e.g. after --checkout of the first. On a conflict, it stops there, for git cherry-pick --continue or --abort. Only with a clean working tree, like --checkout, whose checks are shared now.
* configs/claude: the remotes wait for the logintv4 days2-4/+29
| | | | | | | | | | | | | Remote Control needs a login, and the units answer its questions in ~/.claude.json, which may come before it: so the units have ConditionPathExists on ~/.claude/.credentials.json (skipped, not failed, before the login), and a path unit on it starts the restore service, which starts the static remotes now, too, and the dynamic ones: at boot, if there's a login already, or else as soon as there is. The restore service isn't multi-user.target's anymore, and remains active, once done, so the path unit starts it once. claude-remote start refuses before the login, as the unit would be skipped, and forgotten.
* configs/claude: Remote Control's questions, answered by the unittv4 days1-4/+19
| | | | | | | | | | | | Remote Control asks two things: whether to enable it, once per machine (remoteDialogSeen in ~/.claude.json, which claude remote-control checks before it asks), and to trust ~/remotes/NAME, once per remote (projects.DIR.hasTrustDialogAccepted). The unit answers both now, before it starts: enabling it is what the units are for, and ~/remotes/NAME is the remote's own directory, just made. So, but for claude auth login, no remote needs an attach. Atomically, and only once there is a ~/.claude.json (after the login); if it fails, or a remote writes back what it read before, Remote Control asks, as before.
* configs/claude: a static remote taken out goes on, as a dynamic onetv4 days2-3/+19
| | | | | | | | | The restore service keeps the static remotes of each boot (in /home/.var/lib/claude/static-remotes); one that was static at the last boot, but isn't anymore, gets a state file, i.e. becomes dynamic, and starts again, as long as it has a directory. To retire one: claude-remote stop NAME, as for any dynamic one. The first boot with this only notes the static ones.
* pkgs/claude-inbox: list in color, by whose turn it istv4 days1-5/+35
| | | | | | | | On a terminal, each row in its STATE's color, the STATE in full, the rest a bit muted (without the bold, or faint): review and push (amber), VM-ahead! (red), all bold, and yours (blue): what's to do; rebase (grey) and done (green): the remote's turn; * in bold, and the header. Colored after column -t, so the columns stay aligned.
* configs/claude: git without gettexttv4 days1-1/+14
| | | | | | | | | git-minimal refers to gettext (25M) only for git-sh-i18n, which its shell scripts use for messages in other languages than English, which the guest has none of: the remotes' git and claude-remote's, built with nlsSupport = false (NO_GETTEXT), and without nixpkgs' postPatch putting gettext.sh's path into git-sh-i18n regardless. Not as an overlay of gitMinimal, which fetchers and builds use, too.
* modules/claude-code: without alsa-libtv4 days1-1/+7
| | | | | | | | The wrapper puts alsa-lib on LD_LIBRARY_PATH, for voice input, which claude loads libasound for when asked to, and which is useless on a guest: an empty one instead, rather than null, which would leave an empty entry there, i.e. the current directory. ~7M less (alsa-lib, alsa-ucm-conf, alsa-topology-conf).
* pkgs/claude-remote: the help in sections, and in colortv4 days1-23/+79
| | | | | | | | As claude-inbox's: Commands, each with its description indented below it, and Kinds; on a terminal, the headings in bold, commands, options and names in colors (truecolor, 256 or 8, as the terminal has them, none with NO_COLOR), errors too; and an unknown command or option is a one-line error now, not all of the help.
* pkgs/claude-inbox: branches without a prefix are $LOGNAME's, not tv'stv4 days1-10/+13
| | | | | | | The owner of branches without a remote's prefix (and of master), and whose are yours: $LOGNAME, else $USER, else id -un, rather than tv; and yours by the missing prefix, not the name, so a remote of that name isn't yours.
* pkgs/claude-inbox: --checkout=BRANCH, detached, in a clean working treetv4 days1-6/+40
| | | | | | | Fetches REPO first, like --show, then checks out claude's BRANCH there, detached, without a local branch; only if the working tree is clean: nothing changed, nothing untracked, no merge, rebase, cherry-pick or revert going on. --checkout BRANCH is the same, with BRANCH a word.
* pkgs/claude-inbox: show --git=ARGS, more arguments for gittv4 days1-7/+50
| | | | | | | | --show runs git log (master..BRANCH, or the graph), or git diff with --diff; --git adds to its arguments, split at spaces, and it can come again: --git=-p --git='-n 1' is --git='-p -n 1'. Completion offers git log's options after --git= (git diff's, with --diff), also for the last word inside quotes.
* configs/claude: claude-remote with the guest's systemdtv4 days1-0/+1
| | | | | | | | claude-remote got nixpkgs' systemd from callPackage, so with a slimmer one in the base system (firecracker's base/systemd.nix), the claude layer's image would carry the full one, too, for systemctl. Now it takes the guest's, as forget does already; with nixpkgs' systemd, nothing changes.
* pkgs/claude-remote: rename OLD NEW, all or nothing, and back by NEW OLDtv4 days1-5/+273
| | | | | | | | | | | | | | | | | | | A remote, renamed: its directory, its Claude Code project (and the link to its claude.ai session in it), its trust in ~/.claude.json, the worktrees in it (repaired), its branches (OLD/* to NEW/*), and a dynamic one's mark; stopped first, if it runs, and started after. Each step is a rename, so rename NEW OLD takes it all back. Everything gets checked first, and nothing changes unless all's well: OLD there, and not static; nothing of NEW's there (directory, project, unit, mark, branches; but an entry in ~/.claude.json alone, which a remote writing back what it read before can bring back, gets replaced); not run from OLD itself; nothing but OLD's own unit using it (and, once stopped, nothing at all); no other rename running. Then all or nothing: before each step, how to take it back, which looks at what's there (so a step half done gets taken back, too), and if one fails, those get done, last first. Only if that fails, too, a copy of ~/.claude.json as it was stays, which list shows until it's removed. The process, in the header.
* pkgs/claude-inbox: third parties' repositories are in ~/tmp/src nowtv4 days1-1/+1
|
* configs/claude/rsync-filter: third parties' repositories in ~/tmp/srctv4 days1-2/+1
| | | | | They've moved from ~/src/tmp to ~/tmp/src, which /claude/tmp/ excludes already.
* pkgs/claude-inbox: the help in sectionstv5 days1-43/+72
| | | | | | | Commands, Words, Options, and the list's columns, each command and option on a line of its own, its description indented below it, the headings in bold on a terminal; and an unknown option is a one-line error now, not all of that.
* pkgs/claude-inbox: REPO from the current directory, where one's neededtv5 days1-3/+30
| | | | | | --push and --show without BRANCH (the graph) take the repository the current directory is in, when they get no REPO: by DIR as given, or else physically (cd -P), so symlinks don't matter, without git.
* pkgs/claude-inbox: is_repo from .git/config, without gittv5 days1-0/+9
| | | | | | | A BRANCH without REPO is looked for in every repository in DIR, and is_repo ran git remote get-url for each, which adds up with hundreds (~0.4s for 300); [remote "claude"] in .git/config does it without git, but where .git isn't a directory.
* pkgs/claude-inbox: the help and errors in colortv5 days1-3/+48
| | | | | | | On a terminal, as completion has them: commands (and COMMAND), options (and OPTION), REPO, BRANCH, and in an error, the repository and branch it's about; truecolor, 256 or 8 colors, as the terminal has them, and none with NO_COLOR, on a dumb terminal, or into a pipe.
* pkgs/claude-inbox: take without master checked outtv5 days1-13/+30
| | | | | | | | When master isn't checked out anywhere, take does without a working tree: it fast-forwards master by fetching into it (which takes fast-forwards only), and take --force makes the new master a branch, not a checkout. --pick still needs master checked out, and master checked out in another worktree is refused.
* pkgs/claude-inbox: list: fewer git runs, the repositories in paralleltv5 days1-31/+51
| | | | | | | Per branch, it ran cherry, rev-list, rev-parse (seen) and log (age); now one for-each-ref per repository has tips, ages and what's been seen, so it's cherry and rev-list per branch, and the repositories go in parallel.
* pkgs/claude-inbox: completion: repositories and branches from .gittv5 days1-4/+40
| | | | | | | | Running git twice per repository (remote get-url, for-each-ref) on every TAB adds up, with many repositories; so read [remote "claude"] from .git/config, and claude's branches from packed-refs and the loose refs, and run git only where .git isn't a plain directory (a worktree's), or the refs aren't files (reftable).
* pkgs/claude-inbox: completion: listed in color, by kindtv5 days1-1/+62
| | | | | | | | | | Readline prints escapes in candidates as ^[, so on a second TAB (just listing, COMP_TYPE ?), the completion prints the list itself, in columns like readline's, each kind in a color of its own, truecolor, 256 or 8 colors, as the terminal has them, and gives readline a single blank candidate, to list instead, so that readline redraws the prompt (one blank line, the price). With NO_COLOR, or a dumb terminal, readline lists them, as before.
* 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.