My personal Chezmoi dotfiles, configurations, themes, and developer tools for macOS.
This repository contains my personal Chezmoi configuration for macOS. It's designed to provide a consistent, beautiful, and efficient development environment across multiple machines. The setup is highly automated, leveraging Homebrew for package management, 1Password for secrets, and a suite of modern, CLI tools.
- Declarative Package Management: All packages, casks, and applications are defined in
.chezmoidata/*.jsoncfiles and installed via a templated HomebrewBrewfile. - 1Password Integration: Securely manages secrets and sensitive data like Git signing keys using the 1Password CLI and the
onepasswordReadtemplate function. - macOS Optimisation: Includes scripts to apply sensible macOS defaults, enhancing the user experience for developers.
- Comprehensive Tooling: Pre-configured settings for a wide range of development tools, including multiple editors (VSCode, Zed, Helix, Neovim), shell tools, and more.
- XDG Compliance: Follows the XDG Base Directory Specification for a clean and organised home directory.
- Modern Shell Environment: A powerful and customisable Zsh setup featuring the Starship prompt,
fzf,zoxide, and various plugins. - Automated Setup: Scripts for initial setup and ongoing maintenance, including Homebrew installation, package updates, and environment configuration.
- 1Password: Ensure you have 1Password and the 1Password CLI installed and configured.
- Chezmoi: Install Chezmoi using Homebrew:
brew install chezmoi. - macOS: This configuration is tailored specifically for macOS.
You can initialise this configuration on a new machine with a single command:
chezmoi init --apply https://github.com/tsdevau/dotfiles.gitThis will clone the repository and apply the dotfiles to your home directory.
This repository is organised to be modular and easy to navigate. Here's a breakdown of the key directories and files:
.chezmoiignore: Specifies files and directories that Chezmoi should ignore..chezmoidata/: Contains JSONC files with data for templates, including package lists and user information..chezmoiscripts/: Holds scripts that run at different stages of thechezmoi applyprocess.private_dot_config/: The heart of the configuration, following the XDG specification. It contains settings for various applications.private_dot_ssh/: Manages SSH configuration.private_Library/: Contains macOS-specific application support files and settings.
private_dot_config/chezmoi/chezmoi.jsonc: Main Chezmoi configuration, including Git auto-commit settings..chezmoidata/data.jsonc: General user data and editor preferences..chezmoidata/homebrew.jsonc: Lists Homebrew taps, formulae, and casks..chezmoidata/mas.jsonc: Lists Mac App Store applications to be installed..chezmoidata/pnpm.jsonc: Lists global pnpm packages..chezmoidata/rust.jsonc: Specifies Rust toolchains and components.
The .chezmoiscripts/ directory contains scripts that automate the setup process:
run_once_before_01-configure-touch-id.sh: Configures Touch ID and Apple Watch forsudoauthentication.run_once_before_02-install-homebrew.sh: Installs Homebrew if it's not already present.run_once_after_03-install-homebrew-bundle.sh.tmpl: Installs and updates packages from theBrewfile.run_once_after_05-configure-dev-env.sh.tmpl: Sets up the development environment, including pnpm and Rust.run_once_after_06-configure-shell-plugins.sh: Installs Zsh plugins.run_once_after_99-apply-macos-defaults.sh: Applies custom macOS system defaults.
This setup uses a declarative approach to package management. All packages are defined in the .chezmoidata/ directory and installed using a templated Brewfile.
To add a new package:
- Edit the appropriate file in
.chezmoidata/(e.g.,homebrew.jsoncfor a new cask). - Run
chezmoi apply. - The
run_once_after_03-install-homebrew-bundle.sh.tmplscript will automatically detect the changes and install the new packages.
This configuration leverages 1Password for secure management of secrets. The Git configuration, for example, retrieves the GPG signing key directly from 1Password:
signingkey = \{\{ `onepasswordRead "op://Personal/l4c4htdjojwcfanbjr2hqxeufm/Section_yfmxturzjnv4gl3aqas3jjhamy/signingkey"` \}\}This ensures that sensitive information is never stored directly in the repository.
You can customise the configuration by editing the files in the .chezmoidata/ directory. For example, you can change your name, email, and preferred editors in data.jsonc:
{
"editors": {
"gui": "code",
"tui": "hx",
"visual": "code --wait"
},
"user": {
"email": "[email protected]",
"githubUsername": "mrjones",
"name": "Mr. Jones"
}
}Here are some common commands for managing your dotfiles with Chezmoi:
chezmoi apply: Apply any changes to your dotfiles.chezmoi diff: See what changes would be made without applying them.chezmoi edit ~/.config/git/config: Edit a managed file directly.chezmoi update: Pull the latest changes from the source repository.chezmoi doctor: Check for any issues with your setup.
This configuration uses the Catppuccin theme across a wide range of applications, providing a consistent and beautiful user experience. You'll find Catppuccin themes for:
- Bat
- Ghostty
- Glamour
- Glow
- Helix
- And many more...
While this is a personal configuration, I'm happy to receive suggestions and contributions. Feel free to open an issue or a pull request if you have ideas for improvements.
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.


