Commit Graph
55 Commits
Author SHA1 Message Date
Alexander Heldt b134093221 pinwheel: Show what the branch changes in .envrc, not its diff from main
The prompt showed `git diff main -- .envrc`, so a branch made before
main changed .envrc showed main's new lines as removed, as if the
branch deleted them. It now shows the branch's own changes, from where
it branched off main, and lists the commits that changed .envrc on main
since then.
2026-11-25 09:25:47 +01:00
Alexander Heldt b794227722 pinwheel: Ask before allowing a worktree's .envrc that differs from main's
wt allowed a new worktree's .envrc only when it matched the primary
checkout's, and left it blocked otherwise. A branch based on an older
main has an older .envrc, so its worktree stayed blocked, `direnv exec`
failed, no .bsp/pants.json was written and Metals set up scala-cli
instead. The warning saying so scrolled away when a review started
Emacs.

It now compares with main's .envrc: the same content is allowed as
before, and different content is shown as a diff with a y/N prompt
before anything else runs. Comparing with main rather than the primary's
working copy also stops wt allowing content that was never approved in
the primary.
2026-11-25 08:51:24 +01:00
Alexander Heldt bfa3ef7507 pinwheel: Add rv, the review request watcher
rv (alex/rv on gitea) watches GitHub for pull requests that request a
review from me or from soundtrackyourbrand/content, notifies on each,
and lists them in a web UI on 127.0.0.1:7778 that opens a review in its
own worktree with Emacs. programs.rv runs `rv serve` as a systemd user
service with the work GitHub token, on the same condition as the other
GitHub-backed work tools.
2026-11-24 18:03:24 +01:00
Alexander Heldt 5d51af4189 pinwheel: Prune deleted worktrees in wt sync
A worktree whose directory was deleted by hand stays registered in git,
so `wt sync` ran `gt restack` in a directory that no longer existed and
reported the worktree as failed. It now runs `git worktree prune` before
going through the worktrees, which drops only entries whose directory
is gone.
2026-11-24 17:29:46 +01:00
Alexander Heldt 5207e3e227 pinwheel: Write .bsp/pants.json in new worktrees
`.bsp/` is gitignored, so a worktree started without the Pants BSP
connection file. Metals then found no build server, ran `scala-cli
setup-ide` and compiled the whole repo as one Scala 3 project with no
third-party dependencies, so go to definition found nothing and
semanticdb never appeared.

When the primary checkout has `.bsp/pants.json`, `wt` now runs `pants
experimental-bsp` in each worktree it adds, in that worktree's devshell
and without starting a pantsd. The runner script it writes records the
devshell's PATH and the checkout's log path, so it is generated rather
than copied from the primary. When direnv cannot load, as when the
`.envrc` differs from the primary's, `wt` says what to run instead.
2026-11-24 17:22:45 +01:00
Alexander Heldt 3d2208f432 pinwheel: Add wt --help and reject unknown wt options
An unknown option such as `-b` or `--help` was taken as a branch name
and passed on to `git worktree add`, which read it as its own option:
`--help` printed git's usage and `-b` failed asking for a value. `wt`
now prints its own usage for `-h`/`--help`, moved there from the
comment at the top of the file, and rejects any other option.
2026-11-24 10:33:11 +01:00
Alexander Heldt 67eb18c890 pinwheel: Run wt sync from the primary checkout
In a worktree, `gt sync` deletes a merged current branch by first
switching to main, which git refuses while the primary has main checked
out. `wt sync` now runs `gt sync` in the primary, which leaves a merged
branch checked out in a worktree alone.

Worktrees whose PR is merged are no longer restacked. They stay until
removed with `wt rm`, so a session in one can still be resumed. The
merged PRs are read from gt's `.graphite_pr_info` cache, which `gt sync`
has just refreshed; gt has no command that lists them.
2026-11-24 10:27:39 +01:00
Alexander Heldt b21c943b04 pinwheel: Add wt sync to restack every worktree
`gt sync` skips branches checked out in another worktree, so a stack
living in one stays on the old main. `wt sync` runs `gt sync`, then
`gt restack` in each worktree not on main. A conflict in one worktree
leaves it mid-rebase and does not stop the others; the failed
worktrees are listed at the end and the exit status is 1.
2026-11-23 08:14:32 +01:00
Alexander Heldt 426d29bbd4 pinwheel: Add wt for git worktrees beside the primary checkout
`wt <branch>` goes to the worktree holding a branch, creating one in
`<primary>.worktrees/<branch>` if needed; `wt -c` starts a new
Graphite-tracked branch off main in its own worktree; `wt rm` removes
one and keeps the branch.

A new worktree gets `direnv allow` only when its `.envrc` matches the
primary's. In backend it also gets a `.pants.rc` pinning `find_links`
to the primary's `dist/`: `pants.toml` sets it to the checkout's own
path, which put the path into every `requirements.pex` cache key and
made each worktree rebuild them. No lockfile resolves from it.
2026-11-22 18:25:33 +01:00
Alexander Heldt 404138d411 pinwheel: Toggle the work VPN from waybar without sudo 2026-11-13 10:14:00 +01:00
Alexander Heldt cae7c4cbcf pinwheel: Route browser links to work firefox profile from work checkouts 2026-10-02 09:16:32 +02:00
Alexander Heldt 935b3022e2 pinwheel: Open gcloud links in work firefox profile 2026-10-02 08:59:12 +02:00
Alexander Heldt 53644b5d25 pinwheel: Open graphite links in work firefox profile 2026-09-30 09:30:46 +02:00
Alexander Heldt da2fbe4f42 pinwheel: fix ~/code/work ownership, drop custom secret paths
systemd-tmpfiles now ensures ~/code and ~/code/work are owned by
alex, since agenix previously created ~/code/work as root when the
work secrets pointed there directly.

Also drop the custom path= on work-gitconfig, work-github-token, and
work-go-private so they use agenix's default secret path instead of
living under ~/code/work.
2026-09-29 09:20:18 +02:00
Alexander Heldt 5cf4c1037a pinwheel: Load direnv ZSH on devshell load 2026-06-03 12:58:05 +02:00
Alexander Heldt fd7fccd9ae pinwheel: Install slack for work 2026-03-22 18:36:07 +01:00
Alexander Heldt d182b515d8 pinwheel: Ignore .direnv in intellij 2026-03-22 18:35:42 +01:00
Alexander Heldt 1e771c0d8d pinwheel: Ensure opencode has access to interactive bash 2026-03-19 11:02:27 +01:00
Alexander Heldt e575a147cd pinwheel: Fix pants use of system 2026-02-14 11:05:51 +01:00
Alexander Heldt 53fad59691 pinwheel: Install copilot in intellij 2026-02-14 10:38:48 +01:00
Alexander Heldt 7a510c5d14 pinwheel: Update idea after updated flake inputs 2026-01-07 14:33:17 +01:00
Alexander Heldt e788efc4ff pinwheel/manatee/backwards: Adjust for updated nixpkgs 2026-01-03 16:41:41 +01:00
Alexander Heldt 6f6090e046 pinwheel: Update work-vpn script 2025-12-27 11:09:15 +01:00
Alexander Heldt d518832836 pinwheel: Fix go ENV variables 2025-10-07 14:35:37 +02:00
Alexander Heldt b9d5cfd001 pinwheel: Use latest intellij for work 2025-10-06 20:29:38 +02:00
Alexander Heldt f8b39ee30c pinwheel: Set intellij version to 2024.2.4 in for work 2024-11-24 19:08:59 +01:00
Alexander Heldt ebda6c57eb pinwheel: Add pants for work 2024-11-02 14:18:28 +01:00
Alexander Heldt d8419b01a2 pinwheel: Don't override graphite version 2024-09-30 08:08:56 +02:00
Alexander Heldt d2743436aa pinwheel: Add grpcurl to work module 2024-09-05 12:40:00 +02:00
Alexander Heldt fb281612e8 pinwheel: Move postman to work module 2024-09-05 12:39:44 +02:00
Alexander Heldt f15701f426 Apply nixfmt 2024-09-02 21:55:41 +02:00
Alexander Heldt 4afbe23915 pinwheel: Remove pants.nix from work module 2024-09-02 20:41:42 +02:00
Alexander Heldt 79f939c5c9 pinwheel: Update graphite 2024-08-29 13:43:37 +02:00
Alexander Heldt 2e0622fecc pinwheel: Cleanup work module 2024-08-27 09:50:25 +02:00
Alexander Heldt ac279110f5 pinwheel: Use pkgs.buildFHSUserEnv for pants 2024-07-21 10:13:37 +02:00
Alexander Heldt a319555b35 pinwheel: Add work dependencies 2024-07-13 10:15:59 +02:00
Alexander Heldt d88d9634f6 pinwheel: Bump graphite-cli version 2024-06-17 16:31:17 +02:00
Alexander Heldt d470650406 pinwheel: Add pants (called through nix-alien) to work module 2024-06-17 14:20:00 +02:00
Alexander Heldt 5d30b57709 pinwheel: Add syb-cli to work module 2024-06-03 21:19:53 +02:00
Alexander Heldt c795e6bda4 pinwheel: Remove ssh.enable from work module
As it is set in the `ssh` module
2024-05-30 15:06:52 +02:00
Alexander Heldt 4c9fb2928e pinwheel: Add google-cloud-sdk to work module 2024-05-11 18:36:59 +02:00
Alexander Heldt ed3aaa99ba pinwheel: Add graphite to work module 2024-05-11 18:36:59 +02:00
Alexander Heldt 4b7a32e9fc pinwheel: Add intellij to work module 2024-05-11 18:36:59 +02:00
Alexander Heldt 6ae7f29f73 pinwheel: Add go private environment variable for work 2024-05-04 18:03:46 +02:00
Alexander Heldt c46a02af61 pinwheel: Add GitHub environment variables for work 2024-05-04 18:02:58 +02:00
Alexander Heldt 3a8c83a234 pinwheel: Update work module and related files/secrets 2024-05-04 18:01:45 +02:00
Alexander Heldt ad42bc2d5c pinwheel: Remove secrets/pinwheel/netrc.age secret 2024-04-09 14:19:09 +02:00
Alexander Heldt 12cc58f4b5 pinwheel: Remove secret pinwheel/work-ovpn-userpass.age"
As it will not be used anymore
2024-04-09 14:12:03 +02:00
Alexander Heldt fcaaf9e0af pinwheel: Set work related ENV var for zcenv 2023-11-09 22:00:58 +01:00
Alexander Heldt 90420f6b6d pinwheel: Move work ssh keys to work module 2023-11-02 09:20:23 +01:00