Skip to content

politician/dotfiles

Repository files navigation

My .files

My dotfiles, managed by chezmoi.

If you want to fork it for your own usage

Setup a new mac

  1. Install command line tools

    xcode-select --install
  2. Insert Smart Card (Yubikey, Ledger, etc.)

  3. Install Homebrew, GPG, Chezmoi and launch configuration

    # Install Homebrew
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    [[ $(arch) == "arm64" ]] && eval "$(/opt/homebrew/bin/brew shellenv)" || eval "$(/usr/local/bin/brew shellenv)"
    
    # Install GPG and Chezmoi
    brew install gpg chezmoi
    
    # Use configuration from this repo
    chezmoi init politician --apply
  4. My personal todo list of manual actions:

    • This script will open, Alfred, Moom, Docker Desktop. You must manually grant them the needed permissions and enable start at boot
    • Grant Full disk access to Alfred and Terminal
    • Reboot sudo shutdown -r now
    • Connect to Firefox sync or copy profile folder (open about:profiles)
    • Install Xcode mas install 497799835 (was removed from this script because the 12GB+ download can be slow as hell)

Pull and apply latest changes from this repo

chezmoi update

Edit files and push changes

For example, modify ~/.vimrc (already managed by chezmoi)

chezmoi edit ~/.vimrc

Apply changes

chezmoi apply

Commit changes

chezmoi git add .
chezmoi git commit
chezmoi git push

Before formatting a mac

Make sure all files are up to date with chezmoi

cd ~

# Export list of brew/cask/mas installed packages
brew bundle dump --force

# Re-add linked files
chezmoi re-add

# Re-add VSCode settings as multi-arch template
sed 's|'"$(brew --prefix)"'|{{ if eq .chezmoi.arch "arm64" }}/opt/homebrew{{ else }}/usr/local{{ end }}|' ~/Library/Application\ Support/Code/User/settings.json > $(chezmoi source-path)/private_Library/private_Application\ Support/private_Code/User/settings.json.tmpl

Review changes and commit

chezmoi git status

chezmoi git add .
chezmoi git commit
chezmoi git push

Applications

This repo includes scripts to install as well as build all the apps that need to be.

I try to choose OSS apps over commercial ones unless the experience is too degraded or it prevents me from doing my work properly.

Here are the most notable ones:

OSS/ Free Alternative Proprietary/Commercial
NX Studio Lightroom
Gimp & Krita Photoshop
Inkscape Illustrator
Jitsi Meet Zoom
Kdenlive (No m1 support) - Now using iMovie and evaluating OpenShot, Shotcut Premiere
OnlyOffice (I have an Office subscription) Office
Penpot Figma
DBeaver Navicat

Mac OS configuration

This repo includes a script to configure my Mac OS and several applications settings.

Forking

If you want to fork this repo and modify it for your own personal/commercial usage, please do so freely, it is licensed accordingly (MIT).

Before you apply any settings, don't forget to:

  • Customize chezmoi settings
  • Remove my encrypted files and eventually re-add your own. See which files are encrypted with find $(chezmoi source-path) -type f -name "encrypted*.asc"