A collection of configuration files for a macOS development environment, following the XDG Base Directory Specification.
-
XDG Compliance: Uses
~/.config
,~/.cache
,~/.local/share
for cleaner organization -
Shell: ZSH with Oh-My-ZSH and bullet-train theme
-
Editors: Neovim with programming support
-
Terminal: iTerm2 configuration
-
Git: Custom aliases and settings with GitHub integration
-
Homebrew: Managed packages via Brewfile with Apple Silicon support
-
macOS: System defaults for better productivity
-
Fonts: Nerd Font installation for better terminal and editor experience
-
Cross-Platform: Basic Linux compatibility for shared environments
-
Error Handling: Automatic backup and rollback capability
-
Dependency Checking: Verification of required tools before installation
-
Validation: Repository structure validation and auto-fixing
curl -fsSL https://raw.githubusercontent.com/feniix/dotfiles/master/setup.sh | bash
-
Install Command Line Tools:
xcode-select --install
-
Clone the Repository:
git clone https://github.com/feniix/dotfiles.git ~/dotfiles cd ~/dotfiles
-
Run the Setup Script:
./setup.sh
After installation, configuration files will be located at:
-
Zsh:
~/.config/zsh/.zshrc
-
Neovim:
~/.config/nvim/init.lua
-
Git:
~/.config/git/config
-
Homebrew:
~/.config/homebrew/Brewfile
~/dotfiles/
├── scripts/ # All scripts organized by category
│ ├── setup/ # Main setup scripts
│ │ ├── setup_xdg.sh # XDG directory setup
│ │ ├── setup_zsh.sh # Zsh and Oh-My-Zsh setup
│ │ ├── setup_nvim.sh # Neovim configuration
│ │ ├── setup_macos.sh # macOS-specific setup
│ │ ├── setup_linux.sh # Linux-specific setup
│ │ ├── setup_homebrew.sh # Homebrew package management
│ │ ├── setup_fonts.sh # Nerd Font installation
│ │ ├── setup_github.sh # GitHub integration
│ │ └── cleanup.sh # Legacy files cleanup
│ ├── macos/ # macOS-specific scripts
│ │ └── osx-defaults # macOS defaults script
│ └── utils/ # Utility scripts
│ ├── flushdns # DNS cache flush for macOS
│ ├── ssl-cert-check # SSL certificate validation
│ ├── make-mime.py # MIME type generator
│ └── view-secrets # View encrypted files
├── nvim/ # Neovim configuration
├── fonts/ # Font configuration and management
├── zsh_custom/ # Custom ZSH themes and plugins
├── Brewfile # Homebrew packages list
├── zshrc # Zsh main configuration
├── zshenv # Zsh environment variables
└── setup.sh # Main installation script
The main setup script provides options for partial installations:
cd ~/dotfiles && ./setup.sh
Then select from the menu:
- Update existing dotfiles to XDG format
- Run XDG setup only (for migrating existing configs)
- Run platform-specific setup only (macOS or Linux)
- Run Neovim setup only
- Run Homebrew setup only
- Set up fonts
- Set up GitHub integration
- Clean up legacy files
- Exit
You can also run individual setup scripts directly:
# Install and configure GitHub integration
./scripts/setup/setup_github.sh
# Install programming fonts with Nerd Font patches
./scripts/setup/setup_fonts.sh
# Set up Homebrew and install packages
./scripts/setup/setup_homebrew.sh
# Set up platform-specific configuration
./scripts/setup/setup_macos.sh # For macOS
./scripts/setup/setup_linux.sh # For Linux
The dotfiles setup includes several safety features:
- Dependency Checking: Verifies required tools are installed before proceeding
- Repository Validation: Checks for proper directory structure and files, auto-fixes issues
- Automatic Backups: Creates backups of existing configurations before modifying
- Rollback Capability: Restores from backup if an error occurs during installation
- Consistent Logging: Clear color-coded logging to understand what's happening
This dotfiles repository works on:
- macOS: Full support for both Intel and Apple Silicon Macs
- Linux: Basic support for Debian/Ubuntu, Fedora, and Arch Linux
The setup script automatically detects your platform and runs the appropriate configuration.
- Symlink Approach: Configuration files remain in the dotfiles repository and are symlinked to their respective XDG locations
- Zsh Theme: The bullet-train theme is installed and linked from the dotfiles repository to the standard oh-my-zsh location
- Plugin Management: Plugins like zsh-completions are managed directly without git submodules
- Modular Setup: Each component (Neovim, Zsh, macOS settings) has its own setup script for easier maintenance
- Cleaner Home Directory: No more dotfile clutter
- Better Organization: Configurations are grouped logically
- Easier Backup: All configurations in standardized locations
- Portability: Follows established standards
- The
~/.zshenv
file is used to set up XDG environment variables - Some legacy applications may still create dotfiles in the home directory
- Utility scripts are now linked to
~/bin
instead of~/sbin
for better PATH compatibility - Backups are stored in
~/.local/share/dotfiles_backup/TIMESTAMP/
MIT