Skip to content

gsantovena/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

339 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Gerardo SantoveΓ±a's dotfiles

My personal dotfiles for a consistent development environment across machines.

πŸš€ Quick Start

# Clone the repository
git clone git@github.com:gsantovena/dotfiles.git ~/.dotfiles
cd ~/.dotfiles

# Run quality checks
make check

# Install dotfiles
make install

πŸ“‹ Features

  • Shell Configuration: Zsh with zinit-managed plugins, Oh My Posh prompt, custom aliases, and functions
  • Editor Setup: Neovim-only configuration with lazy.nvim plugin management
  • Terminal Multiplexer: Tmux configuration with TPM plugin management
  • Git Configuration: Custom aliases and templates for efficient workflows
  • Package Management: Comprehensive Brewfile for development tools
  • Security: Proper secrets management and validation
  • Testing: Automated installation validation and security checks

πŸ”§ Installation Options

Using Make (Recommended)

make install-dry       # Preview symlink and backup changes
make install           # Full installation with backup and validation
make quick-install     # Run checks, then install
make install-no-backup # Install only if no existing targets need backup

Direct Script Usage

# Dry run to see what will be changed
./scripts/install-enhanced.sh --dry-run

# Install with backup and validation
./scripts/install-enhanced.sh --backup --verbose

# Force installation (skip validation)
./scripts/install-enhanced.sh --force

πŸ“ Structure

dotfiles/
β”œβ”€β”€ .github/workflows/    # CI/CD automation
β”œβ”€β”€ scripts/             # Installation, test, and validation scripts
β”œβ”€β”€ tests/              # Automated tests
β”œβ”€β”€ home/               # Files symlinked into ~/.* plus shell support
β”‚   β”œβ”€β”€ aliases         # Shell aliases
β”‚   β”œβ”€β”€ bash_profile    # Bash configuration
β”‚   β”œβ”€β”€ exports         # Environment variables
β”‚   β”œβ”€β”€ functions       # Shell functions
β”‚   β”œβ”€β”€ git/            # Git templates and hooks
β”‚   β”œβ”€β”€ gitconfig       # Git configuration
β”‚   β”œβ”€β”€ screenrc        # GNU Screen configuration
β”‚   β”œβ”€β”€ zsh/            # Modular Zsh configuration
β”‚   └── zshrc           # Zsh module loader
β”œβ”€β”€ config/             # Directories symlinked into ~/.config/*
β”‚   β”œβ”€β”€ ghostty/        # Ghostty terminal configuration
β”‚   β”œβ”€β”€ nvim/           # Neovim configuration
β”‚   β”œβ”€β”€ ohmyposh/       # Oh My Posh prompt themes
β”‚   └── tmux/           # Tmux configuration
β”œβ”€β”€ docs/               # Extended project documentation
β”œβ”€β”€ Brewfile            # Package management
└── Makefile            # Build automation

πŸ”’ Security Features

Secrets Management

  • Environment variables for sensitive data
  • Encrypted storage support (GPG/age)
  • Pre-commit secret detection
  • Comprehensive .gitignore patterns

Automated Security Checks

make security          # Run security validation
./scripts/security-check.sh

Best Practices

  • No hardcoded credentials in version control
  • Proper file permissions validation
  • Email address externalization
  • Secure backup procedures

πŸ§ͺ Testing & Validation

Automated Testing

make test             # Run installation tests
make lint             # Shell script linting
make check            # Complete quality validation

Manual Testing

# Test installation in safe environment
./scripts/test-install.sh

# Validate configurations
git config --file home/gitconfig --list
zsh -n home/zshrc
zsh -n home/zsh/*.zsh

πŸ“¦ Requirements

Essential

  • Git: Version control
  • Zsh: Modern shell
  • zinit: Zsh plugin manager (bootstrapped automatically by home/zsh/00-zinit.zsh)
  • Oh My Posh: Prompt engine using configs from config/ohmyposh/
  • Homebrew: Package management (macOS)

Optional

  • Neovim: Modern text editor
  • shellcheck: Script linting
  • bats: Testing framework

Installation Commands

# macOS
brew install git zsh neovim shellcheck oh-my-posh

# Ubuntu/Debian
sudo apt-get update
sudo apt-get install git zsh neovim shellcheck
# Install Oh My Posh with your platform package manager or from https://ohmyposh.dev

# Install all Homebrew-managed tools on macOS
brew bundle --file=Brewfile

πŸ”„ Neovim-only editor setup

This repository now uses Neovim as the only tracked editor configuration. The active runtime lives under config/nvim/, with:

  • config/nvim/init.vim as the thin entrypoint
  • config/nvim/lua/config/* for general editor behavior
  • config/nvim/lua/plugins/* for grouped lazy.nvim plugin specs
  • config/nvim/coc-settings.json for CoC settings

Supporting Neovim docs:

  • docs/nvim/README.md β€” structure and ownership
  • docs/nvim/PLUGIN_AUDIT.md β€” current plugin inventory
  • docs/nvim/PLUGIN_REEVALUATION.md β€” keep/remove/replace decisions

Setup Neovim Plugins

# Plugins are managed by lazy.nvim and install automatically
# Open Neovim to trigger plugin installation
nvim

# Or manually trigger lazy.nvim
nvim -c "Lazy install" -c "qa"

🧩 Tmux plugin setup

The installer bootstraps TPM into ~/.config/tmux/plugins/tpm. Other tmux plugins are declared in config/tmux/tmux.conf and installed by TPM.

# After installation, reload tmux config
tmux source-file ~/.config/tmux/tmux.conf

# Then press prefix + I inside tmux to install declared plugins

Key improvements

  • Better plugin support and performance
  • Asynchronous processing
  • Modern architecture
  • Lua configuration support
  • No split ownership between config/nvim/ and legacy Vim files

πŸ—οΈ CI/CD & Automation

GitHub Actions

  • Automated testing on multiple OS platforms
  • Shell script linting with shellcheck
  • Security scanning and validation
  • Configuration syntax checking

Quality Gates

  • Installation validation
  • Security compliance
  • Cross-platform compatibility
  • Performance checks

πŸ“š Customization

Personal vs Work Configuration

# Set environment-specific variables
export WORK_ENVIRONMENT="true"  # in secrets file

# Use in configurations
if [[ "$WORK_ENVIRONMENT" == "true" ]]; then
    # Work-specific settings
fi

Adding New Configurations

  1. Add home-level dotfiles under home/, or XDG config directories under config/
  2. Update HOME_FILES or CONFIG_FILES in scripts/install-enhanced.sh
  3. Test with make test
  4. Document any dependencies

πŸ”„ Maintenance

Regular Updates

# Update packages
brew bundle --file=Brewfile

# Update plugins
nvim -c "Lazy update" -c "qa"

# Update tmux plugins
# Press prefix + U inside tmux

# Run health checks
make check

Backup & Recovery

# Create backup before changes
./scripts/install-enhanced.sh --backup

# Restore from backup
cp -r ~/.dotfiles-backup-YYYYMMDD_HHMMSS/.* ~/

🚨 Troubleshooting

Common Issues

Installation fails with permission errors

# Fix ownership
sudo chown -R $USER:$USER ~/.dotfiles

# Check permissions
./scripts/security-check.sh

Symlinks not working

# Verify installation
./scripts/test-install.sh

# Manual verification
ls -la ~/.zshrc ~/.gitconfig ~/.config/nvim ~/.config/ohmyposh

Neovim statusline icons look wrong

# Install a Nerd Font if needed
brew install --cask font-hack-nerd-font

Then select Hack Nerd Font in your terminal profile. In iTerm2: Settings β†’ Profiles β†’ Text β†’ Font.

Zsh prompt or plugins not loading

# Ensure Oh My Posh is installed and the prompt config is linked
brew install oh-my-posh
ls -la ~/.config/ohmyposh/zen.toml

# Re-run the installer if the symlink is missing
make install

# Restart shell
exec zsh

The zinit bootstrap in home/zsh/00-zinit.zsh installs zinit into ${XDG_DATA_HOME:-$HOME/.local/share}/zinit/zinit.git on first shell startup.

Getting Help

  • Check GitHub Issues for known problems
  • Run make check for comprehensive validation
  • Review logs in ~/.logs/ directory

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run quality checks: make check
  5. Submit a pull request

Development Workflow

# Set up development environment
git clone your-fork
cd dotfiles

# Make changes
nvim some-config-file

# Test changes
make test

# Run security checks
make security

# Commit and push
git add .
git commit -m "feat: add new configuration"
git push origin feature-branch

πŸ“„ License

MIT License - see LICENSE file for details.

πŸ™ Acknowledgments

  • zinit, Oh My Posh, and Oh My Zsh snippet/plugin communities for shell enhancements
  • Vim/Neovim community for editor excellence
  • Homebrew maintainers for package management
  • Open source contributors who make development better

For the current improvement backlog, see docs/DEVOPS_RECOMMENDATIONS.md.

About

My dot files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors