Skip to content

blooop/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

194 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles

Personal development environment configuration managed with Chezmoi and Pixi.

Profiles

Every install picks a machine profile — the level of invasivity. The profile is resolved once at chezmoi init (interactive prompt, or CHEZMOI_PROFILE env var, or auto-detected from AGS_SHELL/DEVPOD), persisted in ~/.config/chezmoi/chezmoi.toml, and every later chezmoi apply/update uses it — no env vars needed after setup.

Profiles map to capability flags; templates gate on the flags, never on profile names. The matrix lives in one place: .chezmoi.toml.tmpl.

Flag personal shared robot container Controls
identity git user name/email
gui nerd fonts, uhk-agent, nvtop
heavy rust, neovim + config, nodejs, devpod, ccache, pi
host git, git-lfs, openssh, curl, unzip
monitor htop, btop
agents codex, opencode (AI coding CLIs)
  • personal — your own machine: everything.
  • shared — shared account (ags isolated shells, lab PCs): core CLI tools + system monitors + AI coding agents (codex, opencode), git identity omitted so others on the account can't impersonate you.
  • robot — robots/appliances: core + host tools (git, ssh, monitoring), no identity, no GUI, no toolchains.
  • container — devcontainers/DevPod: core tools only; identity kept (DevPod injects git credentials; .gitconfig is skipped in favor of the XDG fallback).

Adding a new machine class = one row in the matrix in .chezmoi.toml.tmpl, no other template changes.

To change an existing machine's profile, re-run init (apply alone reuses the stored one):

CHEZMOI_PROFILE=robot chezmoi init --apply

Usage

Quick Install

One-liner that handles cache permissions and installs everything. The profile is auto-detected (DevPod → container, ags → shared, otherwise personal) or set explicitly with CHEZMOI_PROFILE:

# personal machine
curl -fsSL https://raw.githubusercontent.com/blooop/dotfiles/main/install.sh | bash

# robot / shared machine / container — set the profile explicitly
curl -fsSL https://raw.githubusercontent.com/blooop/dotfiles/main/install.sh | CHEZMOI_PROFILE=robot bash

Manual Installation

sudo apt update && sudo apt install -y curl && \
curl -fsSL https://pixi.sh/install.sh | bash && \
export PATH="$HOME/.pixi/bin:$PATH" && \
pixi global install chezmoi && \
CHEZMOI_PROFILE=personal chezmoi init --apply git@github.com:blooop/dotfiles.git && \
pixi global sync

Replace personal with shared, robot, or container to match the machine. Omit CHEZMOI_PROFILE entirely to be prompted interactively.

Note: Always inspect scripts before running. You can review files at github.com/blooop/dotfiles

Development Containers

For development containers, you have two options:

DevPod (automated):

First-time setup - add the Docker provider and configure automatic dotfiles:

devpod provider add docker
devpod context set-options -o DOTFILES_URL=https://github.com/blooop/dotfiles

This configures devpod to automatically install dotfiles for all new workspaces.

Alternatively, use the --dotfiles argument for individual workspaces:

devpod up <project-repo> --dotfiles https://github.com/blooop/dotfiles

DevPod will automatically detect and run the install.sh script to configure your environment.

Manual (any devcontainer):

Use the DevContainers installation command above, or add to your devcontainer configuration.

What's Included

Core Tools (all profiles)

  • Search & navigation - fzf, fd, ripgrep, zoxide (smart cd), broot (tree browser)
  • Git - lazygit, forgit, gh, git-forgit
  • Terminal - zellij (multiplexer), zjsh, vim
  • Management - chezmoi, pixi, topgrade, prek, isd
  • Utilities - jq, xclip, sshpass, go, claude-shim (claude, cld, cldr)

Capability-Gated Tools (see Profiles matrix above)

  • host - git, git-lfs, openssh, curl, unzip, speedtest-go
  • monitor - htop, btop
  • heavy - neovim (+ full config), nodejs, rust toolchain, devpod, lazydocker, ccache, pi, yq
  • agents - codex, opencode (AI coding CLIs)
  • gui - nvtop, uhk-agent, JetBrainsMono nerd fonts

Git Configuration

The git configuration (included in DevContainers and Full installations) provides:

  • Useful aliases - com (checkout main), pom (pull origin main), cam (commit -am), pomp (pull and push), pushf (push --force-with-lease)
  • Sensible defaults - Auto-setup remotes, push.default = simple
  • Stacked-PR friendly - rebase.updateRefs (rewrite stacked refs in one rebase) and rerere (remember conflict resolutions across restacks)
  • Personal credentials - Uses Austin Gregg-Smith's git user info on profiles with the identity flag (personal, container); omitted on shared and robot profiles so commits made by others on the account can't impersonate you

Cheatsheet

Navigation

Alias Command
.. cd ..
... cd ../..
.... cd ../../..
br broot: browse with type-to-filter; /Enter goes into a dir, goes up. Press alt-t (or type :t) to cd the terminal to the selected dir and quit. Default search is token-based: type comma-separated fragments in any order, e.g. kin,ros matches kinisi_ros. Prefix f/ for fuzzy, |/&/! for or/and/not
z <name> zoxide: jump to most-used dir matching name
Alt+C fzf: fuzzy-pick a subdirectory and cd into it
Ctrl+T fzf: fuzzy-pick a file and paste its path at the prompt

Terminal Workspaces

zj opens a focused workspace picker backed by zjsh: active sessions and configured Kinisi roots, plus the current directory and immediate children of ~/projects. New sessions use a 50/50 shell-and-Claude Zellij layout. The same layout is used by vst inside local or remote containers.

Command / key Purpose
zj / Alt+W Pick or switch workspace without the noisy full zoxide history
Alt+G Open Lazygit in a floating pane
Alt+N Create a pane
Alt+H/J/K/L Move between panes (or tabs at the left/right edge)
Alt+I / Alt+O Move the current tab left / right
Alt+F Show or hide floating panes
mouse wheel / Ctrl+S Scroll directly, or enter Zellij scroll mode

File Listing

Alias Command
ll ls -alF
la ls -A
l ls -CF

Git

Alias Command
gs git status
gp git push
lg lazygit
git diff side-by-side, line-numbered output via delta
gg glo --all — fuzzy all-branches commit graph (forgit log)
ga forgit: interactive add
gd forgit: interactive diff
glo forgit: interactive log
gcb forgit: checkout branch
gss forgit: stash show
pushf git push --force-with-lease (safe force-push for restacks)

Stacked PRs

A stack is a chain of branches/PRs from main up to your top branch. The agent commits each change onto the branch it belongs to; /stack sync does the bookkeeping. GitHub PRs are the source of truth for topology. Two commands:

Command Purpose
/stack create <N> Slice the current branch into an N-PR stack (N−1 interior branches + the original kept as top). Shows the proposed split first.
/stack sync Idempotent bookkeeping from any state: restack each branch onto its parent (bottom→top, onto latest main), reconcile/create/retarget PRs, prune merged branches, push --force-with-lease.

Commit each change onto whichever branch it belongs to, then run /stack sync; descendants restack and every PR updates. gh pr checkout <n> jumps to any PR's branch natively.

Utilities

Alias Command
grep grep --color=auto
mkdir mkdir -pv
df / du / free -h (human-readable sizes)
rm / cp / mv -i (prompt before overwrite)

Claude CLI

Alias Command
cld claude --dangerously-skip-permissions
cldr claude --dangerously-skip-permissions --resume

Codex CLI

Alias Command
cdy codex --yolo

VS Code Container Attach (vs)

Attaches VS Code windows to existing dev containers, local or on another machine over SSH — no F1 menu, no manual ssh. Candidates come from VS Code's own history (every container you've attached to before, with its workspace path) plus any currently running containers; live status is checked with docker ps locally and over ssh. Stopped containers are started automatically before attaching. The picker lists running containers first, then stopped ones, each block ordered by most recent use — the later of when VS Code last opened the workspace and when you last launched it from vs (tracked in ~/.local/state/vs/launches.json). In the picker, ctrl-x forgets the selected entries — it deletes VS Code's workspaceStorage record so they stop cluttering the list, leaving the container and its data untouched — then reopens the picker so you can prune several in a row. Container creation is dl's job; vs only re-attaches.

Command Purpose
vs fzf picker — TAB to multi-select, ctrl-x to forget selected entries, Enter to launch all selected
vs <token> ... batch launch every workspace whose container@host matches a token (e.g. vs k1ci k2ci); exact container names win over substring matches
vs -a [token ...] launch everything (optionally filtered) without the picker
vs -l list known workspaces with live container status
vs -H <host> also scan an ssh host with no attach history (repeatable)
vs -n ... dry-run — print the docker start / code --folder-uri commands only
vst [token] terminal sibling of vs: pick one local/remote container and open its workspace with ags + the shell/Claude Zellij layout
vst -l, vst -H <host>, vst -n [token] list, scan an extra host, or dry-run using the same inventory as vs

Isolated Shell (ags)

Command Purpose
ags Enter an isolated shell with full dotfiles (bootstraps into ~/.local/share/ags on first run, never touches the real HOME)
ags <container> Same, inside a running docker container — injects itself and bootstraps there
ags [<container>] -- <command> Run one command inside the isolated environment (used by vst)
ags update Re-run the dotfiles install in the isolated environment
ags uninstall Remove ags and its cached environment

Install on a remote machine or container (one time, then just type ags in any later login shell):

mkdir -p ~/.local/bin && curl -fsSL https://raw.githubusercontent.com/blooop/dotfiles/main/private_dot_local/private_bin/executable_ags -o ~/.local/bin/ags && chmod +x ~/.local/bin/ags && ~/.local/bin/ags

Safe on shared machines (robots, lab PCs): the entire footprint is ~/.local/bin/ags plus the ~/.local/share/ags cache — no rc files or other shared state are modified, and ags installs exclude personal info (git identity is omitted, so commits made by others on the account can't impersonate you; set GIT_AUTHOR_*/GIT_COMMITTER_* per-session when you need to commit). The dotfiles repo is public and contains no credentials.

For containers you launch yourself (rocker with user mapping), mount the host cache to skip the bootstrap entirely: -v ~/.local/share/ags:/home/$USER/.local/share/ags. Requires matching username/home path and a glibc-based image.

Compatibility

This dotfiles repository is compatible with:

  • DevPod & DevContainers - Automated or manual setup in development containers
  • Traditional Chezmoi workflow - Manual installation and management
  • Any Unix-like system - Linux, macOS, WSL

Managing Changes

After initial setup, use Chezmoi commands to manage your configuration:

chezmoi update    # Pull and apply latest changes
chezmoi edit      # Edit configuration files
chezmoi apply     # Apply pending changes

Machine-specific overrides

For settings you want on one machine but not committed to this (public) repo, use the untracked local override files. They are sourced/included automatically and chezmoi never manages or overwrites them, so they survive chezmoi apply and /sync:

  • ~/.bash_env.local — sourced at the end of ~/.bash_env (per-machine env vars, e.g. WS_EXCLUDE)
  • ~/.gitconfig.local — included from ~/.gitconfig (per-machine git config, e.g. the gh credential helper)

Troubleshooting

Lost SSH config entries after a sync

Symptom: manually-added Host blocks disappear from ~/.ssh/config, seemingly around the time you ran chezmoi apply / /sync.

Cause: not chezmoi. This repo does not manage ~/.ssh/config (chezmoi managed lists no ssh files, and the file has never been in git history), and chezmoi apply never touches unmanaged files. The real culprit is DevPod, which rewrites ~/.ssh/config in place every time a workspace is created, recreated, or deleted. It inserts/prunes blocks between # DevPod Start <ws> / # DevPod End <ws> markers, and when those markers get unbalanced (e.g. an orphaned Start with no matching End) a prune can delete everything down to the next marker — taking your hand-written entries with it. The chezmoi correlation is indirect: run_once_configure-devpod.sh and dl/devpod activity tend to happen right after a sync, and that's what rewrites the file.

Fix — move your personal entries out of DevPod's blast radius. DevPod only edits ~/.ssh/config itself, never files it Includes:

# ~/.ssh/config — keep this near the top (or end); leave the rest for DevPod
Include config.d/*

Put your own Host entries in ~/.ssh/config.d/personal. DevPod keeps churning config; your entries live in a file it never opens.

Hardening:

  • Delete any orphaned # DevPod Start … line that has no matching # DevPod End — those are what make a prune over-delete.
  • To sync personal SSH entries across machines, manage ~/.ssh/config.d/personal with chezmoi. This repo is public, so only do this with age encryption (encrypted_ prefix) — the file contains internal hostnames/IPs that should not be committed in plaintext.

About

dotfiles

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages