Skip to content

felipetio/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

felipetio's dotfiles

Modern development environment configuration for macOS.

Initial Configuration

Finder Settings

# Finder
sudo defaults write com.apple.finder "AppleShowAllFiles" -bool "true"
sudo defaults write com.apple.finder "FXPreferredViewStyle" -string "Nlsv"
killall Finder

DNS Settings

# DNS config
sudo networksetup -setdnsservers Wi-Fi 8.8.8.8

Installation

XCode Command Line Tools

xcode-select --install

Homebrew

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

Official site: https://brew.sh/

For Apple Silicon Macs, add Homebrew to PATH:

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Homebrew Packages

bash <<"EOF"
  # Exit on error and print commands as they execute
  set -ex

  # Install core command-line packages
  brew install \
    1password-cli \
    rg \
    awscli \
    fzf \
    gh \
    git \
    htop \
    libpq \
    mas \
    n \
    neovim \
    pipx \
    poppler \
    pyenv \
    rbenv \
    tmux \
    uv \
    wget \
    xz \
    zsh \
    zsh-vi-mode

  # Install GUI applications via Homebrew Cask
  brew install --cask \
    gitify \
    gpg-suite \
    google-chrome \
    numi \
    1password

  # Install fonts
  brew install --cask font-jetbrains-mono
  brew install --cask font-fira-code-nerd-font

  # Create symlink for psql command to use PostgreSQL client without full PostgreSQL install
  # This makes psql available system-wide
  brew link --force libpq
EOF

Notes:

  • Dockutil is outdated in homebrew, install it from https://github.com/kcrawford/dockutil
  • Installs a newer version of rsync as the one in OSX is outdated and does not support parameters like --chown

Oh My Zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Zsh Plugins

Install recommended plugins:

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

FZF Setup

$(brew --prefix)/opt/fzf/install --key-bindings --completion --no-update-rc

Apple Store Packages

bash <<"EOF"
  set -ex
  mas install 937984704  # mas search amphetamine
  mas install 585829637  # mas search todoist
  mas install 803453959  # mas search slack
  mas install 310633997  # mas search whatsapp
  mas install 1569813296 # mas search "1Password for Safari"
EOF

Pipx Setup

pipx ensurepath

Pyenv Setup

Add to your shell configuration if not already present:

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"

Rbenv Setup

Add to your shell configuration if not already present:

eval "$(rbenv init -)"

Dotfiles Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/dotfiles.git ~/Projects/dotfiles
    cd ~/Projects/dotfiles
  2. Create CONFIG file:

    cp CONFIG.example CONFIG

    Edit CONFIG if needed to adjust destination directory or ignored files.

  3. Preview symlinks (dry-run):

    bin/create-symlinks --dry-run
  4. Create symlinks:

    bin/create-symlinks

What's Included

Shell Configuration

  • .zshrc - Zsh configuration with oh-my-zsh
    • Plugins: git, zsh-autosuggestions, zsh-syntax-highlighting, fzf, history, docker, npm
    • Python virtualenv auto-activation
    • Enhanced history management

Editor

  • .config/nvim/ - Neovim configuration
    • lazy.nvim plugin manager
    • GitHub Copilot integration
    • FZF fuzzy finding
    • NERDTree file explorer
    • Language support (Python, Ruby, Node.js)

Terminal Multiplexer

  • .tmux.conf - Tmux configuration
    • Mouse support enabled
    • Vi-mode key bindings
    • Custom key bindings for pane management
    • 256 color support

Git

  • .gitconfig - Git user configuration and aliases
  • .config/git/ignore - Global gitignore patterns

Other

  • .bashrc - Minimal bash configuration
  • .psqlrc - PostgreSQL client configuration

Installing Neovim Plugins

Plugins will be automatically installed when you first open Neovim with lazy.nvim.

Alternatively, open Neovim and run:

:Lazy sync

1Password Configuration

Allow 1Password CLI to use 1Password Desktop for authentication:

  1. Open 1Password
  2. Settings > Developer
  3. Enable Integrate with 1Password CLI

GPG Configuration

  1. Open the GPG Keychain
  2. Find for "GPG Key" in 1password
  3. Click to view the document, and then Show in Finder
  4. Drag and drop to GPG Keychain

Node/NPM Installation

n lts

GitHub Configuration

Generate a new authentication key:

instructions adapted from https://gist.github.com/mcattarinussi/834fc4b641ff4572018d0c665e5a94d3

  1. Generate new key (find fingerprint with gpg --list-keys)
gpg --quick-add-key [FINGERPRINT] rsa sign,auth 1y
gpg --list-secret-keys --keyid-format=long --with-keygrip
  1. Add new key to sshcontrol
echo [KEYGRIP] >> ~/.gnupg/sshcontrol
ssh-add -l
  1. Export SSH key and add to GitHub

https://github.com/settings/keys

gpg --export-ssh-key me@felipet.io >! ~/.ssh/id_rsa.pub && chmod 0600 ~/.ssh/id_rsa.pub
  1. Test connection
echo UPDATESTARTUPTTY | gpg-connect-agent
ssh -vT git@github.com

Configuring the signing key:

gpg --list-secret-keys --keyid-format=long
git config --global user.signingkey [SIGNING KEY]

Customization

The symlink script is controlled by the CONFIG file:

  • cfg_ignore - Files/directories to skip
  • cfg_first_child - Directories to symlink children (e.g., .config)
  • cfg_dest_dir - Destination directory (usually $HOME)
  • cfg_dotfiles_relative_path - Path to dotfiles repo (relative to dest_dir)

Credits

Thanks to https://github.com/sitaktif for the symlink script inspiration!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •