Commit Graph
54 Commits
Author SHA1 Message Date
Alexander Heldt 593f8e6602 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 19fb6dcf67 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 75591b8bb6 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 my team at work, 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 0e6e7bec8d 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 2fefe711b5 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 1eb0b84bd2 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 bc13103bf2 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 69ab490919 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 5d3629715d 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 cc73f6bfe8 pinwheel: Toggle the work VPN from waybar without sudo 2026-11-13 10:14:00 +01:00
Alexander Heldt d5970e07f9 pinwheel: Route browser links to work firefox profile from work checkouts 2026-10-02 09:16:32 +02:00
Alexander Heldt 5a9e9fc790 pinwheel: Open gcloud links in work firefox profile 2026-10-02 08:59:12 +02:00
Alexander Heldt cc190a5aa8 pinwheel: Open graphite links in work firefox profile 2026-09-30 09:30:46 +02:00
Alexander Heldt 4508678307 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 24b5ed350a pinwheel: Load direnv ZSH on devshell load 2026-06-03 12:58:05 +02:00
Alexander Heldt bf7272f44f pinwheel: Install slack for work 2026-03-22 18:36:07 +01:00
Alexander Heldt 71173d0490 pinwheel: Ignore .direnv in intellij 2026-03-22 18:35:42 +01:00
Alexander Heldt e4560e88b4 pinwheel: Ensure opencode has access to interactive bash 2026-03-19 11:02:27 +01:00
Alexander Heldt 61ab1d17ab pinwheel: Fix pants use of system 2026-02-14 11:05:51 +01:00
Alexander Heldt d426548a48 pinwheel: Install copilot in intellij 2026-02-14 10:38:48 +01:00
Alexander Heldt ccf5b2bb57 pinwheel: Update idea after updated flake inputs 2026-01-07 14:33:17 +01:00
Alexander Heldt 97a57554f6 pinwheel/manatee/backwards: Adjust for updated nixpkgs 2026-01-03 16:41:41 +01:00
Alexander Heldt 280d584ee9 pinwheel: Update work-vpn script 2025-12-27 11:09:15 +01:00
Alexander Heldt 942c5453b2 pinwheel: Fix go ENV variables 2025-10-07 14:35:37 +02:00
Alexander Heldt 30d0071441 pinwheel: Use latest intellij for work 2025-10-06 20:29:38 +02:00
Alexander Heldt 7f5f4901c2 pinwheel: Set intellij version to 2024.2.4 in for work 2024-11-24 19:08:59 +01:00
Alexander Heldt fb26dccf6f pinwheel: Add pants for work 2024-11-02 14:18:28 +01:00
Alexander Heldt 047815b646 pinwheel: Don't override graphite version 2024-09-30 08:08:56 +02:00
Alexander Heldt fcfe6af9dc pinwheel: Add grpcurl to work module 2024-09-05 12:40:00 +02:00
Alexander Heldt 5c48c28b8e pinwheel: Move postman to work module 2024-09-05 12:39:44 +02:00
Alexander Heldt 9c2d1954ed Apply nixfmt 2024-09-02 21:55:41 +02:00
Alexander Heldt e4b4946e8d pinwheel: Remove pants.nix from work module 2024-09-02 20:41:42 +02:00
Alexander Heldt c797e7b212 pinwheel: Update graphite 2024-08-29 13:43:37 +02:00
Alexander Heldt 0f2798f15c pinwheel: Cleanup work module 2024-08-27 09:50:25 +02:00
Alexander Heldt 2140bc134c pinwheel: Use pkgs.buildFHSUserEnv for pants 2024-07-21 10:13:37 +02:00
Alexander Heldt 8afb908b97 pinwheel: Add work dependencies 2024-07-13 10:15:59 +02:00
Alexander Heldt 2f799eeedc pinwheel: Bump graphite-cli version 2024-06-17 16:31:17 +02:00
Alexander Heldt 1a481601f1 pinwheel: Add pants (called through nix-alien) to work module 2024-06-17 14:20:00 +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
Alexander Heldt f37bbdfa09 pinwheel: Add enable option to go module
And use it to check when to add private repository for work
2023-10-02 16:45:27 +02:00