Shell & Prompt
The shell configuration lives in home/common/shell.nix and provides a
consistent experience across macOS and Linux.
Zsh
Zsh is the default shell with these plugins:
- zsh-autosuggestions – fish-like history suggestions
- zsh-syntax-highlighting – command syntax coloring
It also restores a few interactive behaviors that changed after the move to Home Manager-managed zsh:
Deleteperforms forward delete instead of inserting~UpandDownsearch history by the current typed prefixCtrl-Wuses bash-style word boundaries~/.zshrc.localis sourced if present for machine-local shell experiments
Starship Prompt
The prompt uses Starship with an elaborate Ayu Mirage-themed configuration using Nerd Font “pill” segments:
┌ macOS ~/workspace/personal/nix-config main nix 1.2s
└
Each segment is color-coded and separated by Nerd Font glyphs. The prompt shows:
| Segment | What it displays |
|---|---|
| OS icon | macOS/Linux logo |
| Directory | Current path (truncated to 3 levels) |
| Git branch | Branch name + status |
| Languages | Node, Python, Rust, Go, Java versions (when detected) |
| Duration | Command execution time (if > 2 seconds) |
| Shell | Current shell name |
| Time | HH:MM format |
Aliases
Global aliases defined in shell.nix:
| Alias | Command | Notes |
|---|---|---|
ls, l, ll, la | eza variants | With icons and git status |
cat, less | bat | Syntax-highlighted pager |
oc | opencode | AI coding agent |
gst, gd, ga, gc… | git shortcuts | Common git operations |
docker | container | macOS only (Apple container runtime) |
up N | cd ../../../... | Navigate up N directories |
Per-host aliases go in hosts/<arch>-darwin/<hostname>/home.nix or
systems/<arch>-linux/<hostname>/home.nix – see
Per-Host Overrides.
CLI Helpers
Repo-managed helper scripts installed from files/scripts/:
| Script | Purpose |
|---|---|
rund | Run a disposable Ubuntu container with the current directory mounted in |
Packaged Git workflow tools installed via Home Manager:
| Tool | Purpose |
|---|---|
wt | Worktrunk worktree management with shell integration |
git trim | Trim tracking branches merged or gone upstream |
git town | Higher-level branch workflow and sync helpers |
Git worktree management is now provided by Worktrunk via the wt command and
its shell integration configured in home/common/default.nix.
Platform-Aware Behavior
- macOS adds
/opt/homebrew/binand/opt/homebrew/sbinto$PATH - The
dockeralias only applies on Darwin (maps to Apple’scontainerruntime) Esc Esctoggles a leadingsudolike the oh-my-zsh sudo pluginmise activate zshis loaded whenmiseis available- Ghostty shell integration is sourced manually (workaround for cmux)