This repository contains my personal dotfiles and system configuration managed with chezmoi. It automates the setup of a new macOS machine with my preferred settings, packages, and configurations.
This repository includes:
- Shell configuration (zsh, bash)
- Git configuration
- macOS system preferences
- Package management via Homebrew
- NFS mount automation with 1Password integration
- Automated setup script for new machines
For a fresh macOS installation, you can use the automated setup script:
# Option 1: Run directly from GitHub
bash -c "$(curl -fsSL https://raw.githubusercontent.com/lukeevanstech/dotfiles/main/setup.sh)"
# Option 2: Download and run locally
curl -fsSL https://raw.githubusercontent.com/lukeevanstech/dotfiles/main/setup.sh -o setup.sh
chmod +x setup.sh
./setup.shThis script will:
- Install Xcode Command Line Tools
- Install Homebrew
- Install required CLI tools (chezmoi, 1password-cli)
- Initialize and apply this dotfiles repository
If you prefer to set up manually:
- macOS (some scripts are macOS-specific)
- Homebrew for package management
- 1Password and 1Password CLI for secrets management
-
Install chezmoi:
brew install chezmoi
-
Initialize with this repository:
chezmoi init https://github.com/lukeevanstech/dotfiles.git
-
Apply the configuration:
chezmoi apply
-
dot_zshrc: Z shell configuration with: -
dot_bashrc: Bash shell configuration (fallback)
run_once_install-powershell.sh.tmpl: Installs PowerShell on macOSrun_onchange_install-powershell-modules.sh.tmpl: Shell wrapper that executes PowerShell to install and update modulesdot_config/powershell/Microsoft.PowerShell_profile.ps1.tmpl: PowerShell profile with:- Module imports (PSReadLine, posh-git, oh-my-posh, Terminal-Icons, PSFzf)
- Custom prompt configuration
- Aliases and helper functions
- OS-specific settings
.chezmoidata/powershell.yaml: List of PowerShell modules to install
dot_gitconfig: Global Git configurationdot_gitignore: Global Git ignore patterns
run_once_macos-defaults.sh.tmpl: Configures macOS system preferences using thedefaultscommand- Security & privacy settings
- UI/UX preferences
- Finder customization
- Dock & Launchpad settings
- Keyboard, trackpad & input settings
- Network & performance optimizations
- Energy & power management
- App-specific settings (Safari, Terminal, etc.)
-
.chezmoidata/homebrew.yaml: Defines packages to install via Homebrew- CLI tools and utilities
- Applications via Homebrew Casks
- Fonts
-
run_onchange_darwin-install-homebrew.sh.tmpl: Installs and manages packages defined in homebrew.yaml- Automatically installs new packages
- Removes packages no longer in the list
- Preserves system packages and dependencies
-
run_once_setup-nfs-mounts.sh.tmpl: Automates NFS mount setup using 1Password- Retrieves mount information from 1Password
- Creates mount points
- Mounts NFS shares
- Optionally adds entries to /etc/fstab
-
README.nfs-mounts.md: Detailed documentation for NFS mount functionality
After making changes to your dotfiles:
# Apply changes
chezmoi apply
# Update repository with local changes
chezmoi cd
git add .
git commit -m "Update configuration"
git push# Add a file
chezmoi add ~/.some_config_file
# Edit the file in the chezmoi source directory
chezmoi edit ~/.some_config_file
# Apply changes
chezmoi applyEdit .chezmoidata/homebrew.yaml to add new Homebrew packages or casks.
Edit .chezmoidata/powershell.yaml to add new PowerShell modules. The modules will be installed automatically when you run chezmoi apply.
Edit run_once_macos-defaults.sh.tmpl to change macOS system preferences.
- Create a new item in 1Password with tag
nfs-mount - Add required fields (see
README.nfs-mounts.mdfor details) - Run
chezmoi apply
chezmoi cd
# Update homebrew.yaml with new packages
chezmoi apply# Update all PowerShell modules
pwsh -Command "Update-Module"
# Or run chezmoi apply to update based on your configuration
chezmoi applyIf you encounter issues:
- Check the output of
chezmoi apply --verbose - Verify that prerequisites are installed
- Ensure 1Password CLI is authenticated for NFS mount functionality
- For PowerShell module issues:
- Check PowerShell execution policy:
Get-ExecutionPolicy - Verify module availability:
Get-Module -ListAvailable - Check for errors in the PowerShell profile:
Test-Path $PROFILE
- Check PowerShell execution policy:
This project is licensed under the MIT License - see the LICENSE file for details.