Managing your dotfiles or ~/.config ...

Managing your dotfiles or ~/.config ...

Table of Contents

This is a common approach I adopted to manage my dotfiles

I have a priveate one meintainef in house at my company Tikal and a public one in github - here is the link to the public one: hagzag/dotfiles

Info

So a good place to start is the code which is available at hagzag/dot-config

The following is basically the repo’s README.md file which I maintain as I improove it.

Dotfiles and Development Environment Setup

A comprehensive dotfiles management system using Taskfile for automated macOS environment setup and configuration.

🎯 Features

  • Automated XDG directory structure setup
  • Homebrew package management with Brewfile
  • Git configuration with GPG signing support
  • Pre-commit hooks integration
  • Bash environment configuration
  • Rosetta 2 support for Apple Silicon
  • EditorConfig for consistent coding styles
  • Cloud provider credential management (AWS, GCP)
  • VS Code configuration

πŸš€ Prerequisites

πŸ“₯ Installation

  1. Install Homebrew and go-task:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install go-task
  1. Clone the repository:
export DOT_CONFIG_REPO=[email protected]:tikalk/users/hagzag/dot-config.git
task bash:dot_config:get
  1. Setup environment:
cd ~/.config
cp .env.example .env  # Configure your environment variables

πŸ› οΈ Available Tasks

Basic Setup

  • task bash:xdg-setup - Initialize XDG directory structure and bash configuration
  • task xcode:rosetta - Install Rosetta 2 for Apple Silicon Macs

Homebrew Management

  • task brew:install - Install all dependencies from Brewfile
  • task brew:status - Check Brewfile status and outdated packages
  • task brew:dump - Update Brewfile with current packages
  • task brew:cleanup - Remove unused dependencies
  • task brew:commit - Commit Brewfile changes to git

Git Configuration

  • task git:config:generator - Generate git configuration (requires USER_EMAIL and USER_FULL_NAME)
  • task git:config:from-repo - Configure git symlinks and validation from dot-config repo
  • task git:lfs - Install and configure Git LFS

Security & Signing

  • task gnupg - Install GnuPG
  • task gnupg:validate - Validate GnuPG setup and keys

Pre-commit Hooks

  • task pre-commit:install - Configure pre-commit hooks
  • task pre-commit:run - Run pre-commit checks on staged files
  • task pre-commit:run-all-files - Run pre-commit checks on all files

IDE Configuration

  • task create-vscode-config - Creates VS Code settings with Taskfile schema support

Cloud Provider Setup

AWS

  • task aws:tutorial:credentials - Guide for setting up AWS credentials
  • task aws:validate:credentials - Validate AWS credentials configuration

GCP

  • task gcp:tutorial:credentials - Guide for setting up GCP service account
  • task gcp:tutorial:login - Interactive GCP login process
  • task gcp:validate:credentials - Validate GCP credentials configuration

πŸ“ Directory Structure

~/.config/
β”œβ”€β”€ .env                # environment variables part of .gitignore - intended to be used for local development
β”œβ”€β”€ .env-example        # Template for environment variables
β”œβ”€β”€ .editorconfig       # Editor configuration for consistent coding styles
β”œβ”€β”€ Brewfile           # Homebrew dependencies
β”œβ”€β”€ Taskfile.yml       # Task definitions
β”œβ”€β”€ .vscode/           # VS Code configuration
β”œβ”€β”€ bash/              # Bash configuration files
β”‚   β”œβ”€β”€ env            # ~/.bash_env links to this
β”‚   β”œβ”€β”€ profile        # ~/.bash_profile links to this
β”‚   └── rc             # ~/.bashrc links to this
└── git/               # Git configuration
    └── .gitconfig     # ~/.gitconfig links to this

βš™οΈ Configuration

EditorConfig

The repository includes an .editorconfig file that maintains consistent coding styles across different editors and IDEs. It provides settings for:

  • Indentation style and size
  • Line endings
  • Character encoding
  • Language-specific configurations (Python, HTML, YAML, etc.)

Make sure your editor has EditorConfig support installed.

Environment Variables

The repository uses a .env file for configuration. Generate it using the provided task:

task generate:dot:env \
  DOT_CONFIG_REPO="your-repo-url" \
  USER_FULL_NAME="Your Name" \
  USER_EMAIL="[email protected]" \
  USER_SIGNING_KEY="your-gpg-key"

Cloud Provider Configuration

AWS

# View AWS setup instructions
task aws:tutorial:credentials

# Validate AWS configuration
task aws:validate:credentials

GCP

# View GCP setup instructions
task gcp:tutorial:credentials

# Login to GCP
task gcp:tutorial:login

# Validate GCP configuration
task gcp:validate:credentials

🀝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Run pre-commit checks (task pre-commit:run)
  4. Commit your changes (git commit -m 'Add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

comments powered by Disqus

Related Posts

From yak shaving to mastering tasks

From yak shaving to mastering tasks

Originally posted on the Israeli Tech Radar on medium.

TLDR; This is a quick share of a neat tool which found it’s way into my toolset, it did it in such a significant way which enabled me to combine tools in a common way β€” something I’ve been missing for quite a while. This is also a thank you to the author’s and contributors of go-task which is such an awesome tool.

Read More
Scaling I/O Bound Microservices

Scaling I/O Bound Microservices

In this meetup, we will continue our #2ndhalf journey to the next^2. You can see the talks from the 1st meetup of this series here - http://bit.ly/second-half-p1 Nowadays, scaling and auto-scaling have become relatively easy tasks. Everyone knows how to set up auto-scaling environments - Auto-Scaling groups, Swarm, Kubernetes, etc.

Read More
The $1,892 Agent: MiniMax M2.5 and the Dawn of Always-On Intelligence

The $1,892 Agent: MiniMax M2.5 and the Dawn of Always-On Intelligence

TL;DR

MiniMax M2.5 is a 230B-parameter model that activates only 4% of its weights per token β€” yet scores 80% on SWE-bench Verified, putting it neck-to-neck with Anthropic Opus 4.6 at roughly 3% of the cost. At ~$1,892/year for a continuously running agent, the β€œalways-on agent” is no longer a thought experiment. The cost of intelligence is approaching the cost of electricity, and Jevons’ Paradox says: demand is about to explode.

Read More