Skip to content

AlexandrByzov/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dotfiles

Personal macOS development environment configuration and setup automation.

Overview

This repository contains my dotfiles and configuration files for a reproducible development environment. It uses GNU Stow for symlink management and Homebrew for package management.

What's Included

  • zsh: Shell configuration and customizations
  • git: Git configuration and aliases
  • config: Application-specific configurations
  • kube: Kubernetes-related configurations, encrypted with sops
  • Brewfile: Declarative package management for all installed tools

Quick Start

Prerequisites

# Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Installation

# Clone repo
git clone https://github.com/alexandrbyzov/dotfiles.git ~/dotfiles
cd ~/dotfiles

# Install package from Brewfile
brew bundle --file ~/dotfiles/Brewfile

Create symlinks with Stow

stow zsh git config

Usage

Managing Homebrew Packages

Install packages from Brewfile:

brew bundle --file ~/dotfiles/Brewfile

Update Brewfile with currently installed packages:

brew bundle dump --file ~/dotfiles/Brewfile --force

Managing Dotfiles with Stow

The dotfiles directory is the source of truth. Stow creates symlinks from this repo to your $HOME directory.

# Add new dotfiles
stow <directory-name>

# Remove symlinks
stow -D <directory-name>

# Restow (useful after changes)
stow -R <directory-name>

Configuration Guides

Multiple GitHub Accounts

Configure multiple GitHub accounts by setting up separate SSH hosts in ~/.ssh/config:

Host github.com
    HostName github.com
    User git
    IdentityFile path-to-identity-file
    IdentitiesOnly yes
    AddKeysToAgent yes
    UseKeychain yes

Configuration options:

  • IdentitiesOnly yes - Prevents SSH from trying all keys (improves security & performance)
  • AddKeysToAgent yes - Caches passphrase in SSH agent
  • UseKeychain yes - (macOS) Stores passphrase in system keychain

Usage:

git clone git@github.com:username/repo.git

Storing Secrets in macOS Keychain

For sensitive data like age keys, SSH keys, or API tokens, store them securely in macOS Keychain instead of plain files.

Store a Secret

# Store from file
security add-generic-password -s "secret-name" -a "$USER" -w "$(cat /path/to/secret)"

# Store from clipboard
security add-generic-password -s "secret-name" -a "$USER" -w "$(pbpaste)"

# Add -U flag to sync via iCloud Keychain (optional)
security add-generic-password -s "secret-name" -a "$USER" -w "$(cat /path/to/secret)" -U

Retrieve a Secret

# Print to stdout
security find-generic-password -s "secret-name" -w

# Print to stdout multi-line secret (they are usually Hex-encoded)
security find-generic-password -s "secret-name" -w | xxd -r -p

# Write to file
security find-generic-password -s "secret-name" -w > /path/to/secret

macOS Tweaks

Enable Key Repeat

For a smoother typing experience in editors like VS Code:

defaults write -g ApplePressAndHoldEnabled -bool false

Restart your applications for the change to take effect.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors