nix-darwin + home-manager config for macOS.
curl -fsSL https://raw.githubusercontent.com/psteinroe/dotfiles/main/bootstrap.sh | bash- Install Xcode CLI:
xcode-select --install - Install Nix:
curl -sSf -L https://install.determinate.systems/nix | sh - Clone:
git clone https://github.com/psteinroe/dotfiles.git ~/Developer/dotfiles - Build:
nix run nix-darwin -- switch --flake ~/Developer/dotfiles
rebuild- GUI app is installed via Homebrew cask:
tailscale-app - CLI is installed via Nix package:
tailscale - First-time setup requires manual approval in macOS:
open -a Tailscale- Approve extension in
System Settings -> Privacy & Security - Accept VPN/network configuration prompt
- Verify with:
tailscale status
systemextensionsctl list | rg -i tailscaleUse one shared OpenCode web backend and attach from each project locally.
oc lazy-starts the backend if it is not running.
set-keychain-environment-variable OPENCODE_SERVER_PASSWORD
rebuildcd /path/to/project
oc # copen: attach with --dir "$PWD" (auto-starts ocweb if needed)ocweb start # starts `opencode web` in background on 0.0.0.0:4096
ocweb status
ocweb url # prints localhost + Tailscale URL
ocweb logs
ocweb stopOptional tailnet-only passwordless mode:
export OPENCODE_WEB_HOSTNAME="$(tailscale ip -4 | awk 'NR==1{print $1}')"
ocweb startThis is allowed only when hostname is your exact local Tailscale IPv4 (100.x.x.x).
In this mode, ocweb disables OpenCode basic auth by default even if
OPENCODE_SERVER_PASSWORD is configured.
To force auth on Tailscale host:
export OPENCODE_WEB_TAILSCALE_REQUIRE_PASSWORD=1
ocweb restart- Connect phone + Mac to Tailscale.
- Open the URL from
ocweb urlon your phone. - Continue the same sessions from web while still attaching locally with
oc.
Using bare git repos with worktrees for parallel development + git-town for stacked PRs.
wtclone git@github.com:user/repo.git # creates repo.git/ with main/ worktree| Function | Purpose |
|---|---|
wtclone <url> |
Clone as bare repo with main worktree |
wtcreate <name> |
Create new branch worktree |
wtcheckout <branch|pr#> |
Checkout branch/PR into worktree |
wtlist |
List worktrees |
wtclean |
Remove merged/closed PR worktrees |
| Alias | Command | Purpose |
|---|---|---|
gts |
git town sync |
Sync all branches |
gth |
git town hack |
Create feature branch |
gtp |
git town propose |
Create PR |
gtsh |
git town ship |
Merge shipped PR |
# 1. Clone repo with bare setup
wtclone git@github.com:user/repo.git
cd repo.git/main
# 2. Create feature branch
wtcreate my-feature
# or from root: wtcreate my-feature
# 3. Make changes and commit normally
git add -A
git commit -m "Add feature"
# 4. Create PR
gtp # opens PR in browser
# 5. After merge, sync and cleanup
gts # sync all branches
wtclean # remove merged worktreeswtcheckout 123 # checkout PR #123
wtcheckout feat-other # checkout branchCustom nvim-like keybindings.
| Action | Key |
|---|---|
| Go left | Ctrl+H |
| Go down | Ctrl+J |
| Go up | Ctrl+K |
| Go right | Ctrl+L |
| Action | Key |
|---|---|
| New split right | Cmd+D |
| New split down | Cmd+Shift+D |
| Toggle zoom | Cmd+Shift+Enter |
| Equalize | Alt+Shift+= |
| Close | Cmd+W |
| Action | Key |
|---|---|
| Resize left | Cmd+Ctrl+H |
| Resize down | Cmd+Ctrl+J |
| Resize up | Cmd+Ctrl+K |
| Resize right | Cmd+Ctrl+L |
| Action | Key |
|---|---|
| New tab | Cmd+T |
| Prev tab | Cmd+Shift+[ |
| Next tab | Cmd+Shift+] |
| Go to tab 1-9 | Cmd+1-9 |
MIT