summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.