Personal dotfiles that set up my shell, tools and agent environment on any machine, including machines that are not mine.
- Bare and sparse git clone.
- Files live directly in
$HOME, with no symlinks, following the bare repository approach. - A sparse checkout keeps repository-only files (tests, CI, docs) out of
$HOME.
- Files live directly in
- Tools with pixi global.
- CLI tools are installed per user, without root.
- Encrypted secrets.
- API keys and credentials are stored
age-encrypted in the same repository. - They are applied only on request.
- API keys and credentials are stored
- Agent skills.
- Skills are versioned and deployed like any other dotfile.
- Ephemeral shells.
--shellchecks everything out into a temporary$HOME.- A shared machine (Jetson, robot, container) gets my prompt, tools, skills and API keys.
- Nothing is left in the real
$HOMEwhen the shell exits, only a shared package cache.
- Safe lifecycle.
- Conflicting files are backed up.
dotfiles --updateanddotfiles --uninstallhandle updates and removal.
curl -fsSL https://raw.githubusercontent.com/diegoferigo/dotfiles/main/bootstrap | bashThis will:
- Install pixi if not already present
- Download
.local/bin/dotfilesand run it via itspixi execshebang - Clone the bare repo into
~/.dotfiles - Check out tracked dotfiles directly into
$HOME(backing up any conflicts) - Install the tools listed in
TOOLSviapixi global - Report encrypted dotfiles that can be applied separately
git clone https://github.com/diegoferigo/dotfiles.git
cd dotfiles
./bootstrapTo try the dotfiles on a machine that is not yours, --shell checks them out into a temporary $HOME and starts a shell in it, e.g. in a container:
docker run --rm -it ubuntu:latest bash -c '
apt-get update -qq && apt-get install -y -qq curl ca-certificates >/dev/null &&
curl -fsSL https://raw.githubusercontent.com/diegoferigo/dotfiles/main/bootstrap | bash -s -- --shell'- Existing files are not touched. Exiting removes the temporary
$HOME, also onSIGHUPandSIGTERM. - Several shells can run at the same time. They share the package cache in
~/.cache/diegoferigo-dotfilesand the logins ofgh,gcloudandrattler-build, which are deleted when the last shell ends. - Run
dotfiles secrets applyinside the shell to load the encrypted secrets. --no-cachekeeps the packages in the temporary$HOMEtoo, and--branch <name>(GITHUB_BRANCHforbootstrap) tries a branch.
Warning: Secrets and logins are plaintext while the shell runs, and any process of the same user can read them. On a shared account use only scoped and revocable tokens.
Note: to delete the package cache, remove its directory when no shell is running.
The dotfiles command (checked out to ~/.local/bin/dotfiles) wraps git against the bare repo. main is protected, so a change goes through a branch and a pull request:
dotfiles git switch main # start from main
dotfiles --update # make sure it is up to date
dotfiles git switch -c update-starship # new branch
dotfiles git status
dotfiles git diff
dotfiles git add ~/.config/starship.toml
dotfiles git commit -m "Update starship config"
dotfiles git push -u origin update-starship # then open the pull request on GitHubAfter the pull request is merged, go back to main and update:
dotfiles git switch main
dotfiles --update
dotfiles git branch -d update-starship # delete the merged branchOther useful commands: dotfiles git log --oneline, dotfiles git show HEAD.
An agent can do this for you with the bundled working-on-dotfiles skill.
Pull the latest changes and re-apply dotfiles:
dotfiles --updatePublic files are updated independently from encrypted files. Run dotfiles secrets status after an update and apply changes explicitly. Use dotfiles --update --with-secrets to update both in one interactive run.
No font binaries are tracked in git. Install the pinned Nerd Font Mono families used by the prompt explicitly with dotfiles fonts install, which downloads them into ~/.local/share/fonts/ on the current machine only. After the first dotfiles --update that removes previously tracked font files, run dotfiles fonts install, then fc-cache -f, then restart the terminal or editor.
Encrypted sources are tracked under secrets/home/ and map directly below $HOME:
secrets/home/.ssh/config.d/rai.conf.age -> ~/.ssh/config.d/rai.conf
One shared age identity is protected by a high-entropy passphrase stored in a password manager. Its encrypted wrapper is distributed through the repository, so machines do not need separate private-key provisioning. Bootstrap and update leave secrets untouched unless explicitly requested.
dotfiles secrets init
dotfiles secrets encrypt ~/.ssh/config.d/rai.conf
dotfiles secrets status
dotfiles secrets apply
dotfiles --update --with-secrets
dotfiles secrets change-passphraseSee secrets/README.md for setup, authoring, deployment, conflict handling, recovery, and key rotation.
Remove all checked-out dotfiles and restore any backed-up originals:
dotfiles --uninstallUninstall removes unchanged decrypted files and restores their original backups. The tracked encrypted identity follows the normal public-dotfile lifecycle. A legacy plaintext identity is never removed.
- Compatible with GitHub Codespaces: select this repository as your dotfiles repository and Codespaces runs
bootstrapin every new codespace. Rundotfiles secrets applyin the first shell, it asks for the passphrase. - Requires only
pixion the host; all Python dependencies are resolved on-the-fly via the shebang. DOTFILES_REPO,DOTFILES_DIR,BACKUP_DIRenvironment variables can override defaults.