Skip to content
This repository was archived by the owner on Nov 5, 2026. It is now read-only.
mvshmakovPublic archive

About

Dotfiles for macOS

Topics

Resources

Code of conduct

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

386 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

macOS Config Icon

Dotfiles for macOS (relevant for Catalina 10.15+)

Setup

sudo softwareupdate -i -a

mkdir -p ~/projects/personal && cd ~/projects/personal
git clone https://github.com/mvshmakov/dotfiles.git && cd dotfiles

git submodule update --recursive --init

./home/scripts/setup.sh

Everything is declared in nix-darwin: CLI tools from nixpkgs via home-manager, GUI apps as Homebrew casks, Mac App Store apps via mas, macOS defaults, and the dotfile symlinks themselves (every top-level directory mirrors $HOME and is linked into it by home-manager, editable in place). setup.sh installs Homebrew and Determinate Nix and runs the first darwin-rebuild switch. Afterwards:

make nix-check   # build + preflight checks, nothing is activated
make nix-switch  # apply (sudo)
make nix-update  # bump flake.lock, then nix-check/nix-switch

The migration from the Brewfile is staged; the runbook with the remaining phases lives in nix-darwin/.config/nix-darwin/README.md.

Adding a tool's config = adding a <tool>/.config/<tool>/... directory and running make nix-switch; removing it removes the link. Retired configs live in .archive/ (hidden directories are not packages).

If you want to add the submodule, consider running git submodule add --name {name} https://github.com/{author}/{name}.git {tool}/.config/{tool}/{name} instead of just adding the corresponding submodule definition in the .gitmodules. If you want to delete the submodule, see delete_git_submodule.md.

ITerm2's com.googlecode.iterm2.plist is in the $HOME folder, so you need to set it also in ITerm2 settings to load it.

The last step would be to generate new SSH key pair and add it to the required services.

One should also enable the Reduced motion option in the System Preferences to increase the speed of window/desktop switching.

Useful commands

  1. Dump all the installed brew packages: brew list > packages.txt
  2. Dump all the installed brew casks: brew list --cask > casks.txt
  3. Dump all VSCode extensions to shell commands: code --list-extensions | xargs -L 1 echo code --install-extension

Zoxide-based navigation

  • z {pattern}[TAB] will expand the path Z detected

brew

Homebrew is driven by nix-darwin: make nix-switch runs brew bundle against the Brewfile generated from homebrew.nix (HOMEBREW_BUNDLE_FILE points at it). brew/.config/brew/Brewfile is frozen until the phase-2 cleanup.

How to upgrade brew:

  • brew update update brew itself
  • brew upgrade --greedy update all the packages together with :latest and :auto_update

Neovim after the first switch

  • Run :Copilot setup

Atuin

  • Daemon mode requires a socket to be available, the brew services start atuin solves this

yabai & skhd

Both auto-start on boot: their launchd plists are versioned in launchctl/ (whitelisted in .gitignore) and ~/Library/LaunchAgents is a symlink to that directory. home/scripts/services.sh bootstraps them during setup; afterwards launchd loads them on every login.

  • Manage the services with the official commands only: yabai --start-service / --stop-service / --restart-service (same for skhd).
  • Never run --install-service/--uninstall-service: ~/Library/LaunchAgents is a symlink into this repo, so they would overwrite/delete the tracked plists (an unexpected plist diff in git status is the telltale). The tracked plists match the generated ones except for PATH, which is trimmed to a stable machine-agnostic set instead of a snapshot of the installing shell's PATH.
  • One-time manual step per machine: grant Accessibility to yabai and skhd, plus Input Monitoring to skhd (System Settings -> Privacy & Security; macOS prompts on first start).
  • The yabai scripting addition is not used, so no SIP/sudoers changes are needed.
  • The skhd plist/label must stay com.koekeishiya.skhd until an skhd release ships the author's account rename (koekeishiya -> asmvik) - the binary hardcodes that label and plist path. yabai has already migrated to com.asmvik.yabai.

Claude

home/scripts/claude.sh (run by setup.sh, safe to re-run) merges home/scripts/claude/settings.json (model, plugins, permissions, opt-outs) into ~/.claude/settings.json, installs the listed plugins (enabledPlugins alone installs nothing on a new machine) and graphify's skill. ~/.claude/settings.json stays a local file: its autoMode rules describe private infrastructure and only work in user settings. A plugin installed later via /plugin lands only in the local file; copy it to the repo file to share it.

Manual, once per machine:

  • User MCP servers: claude mcp add --scope user --transport http figma http://127.0.0.1:3845/mcp; telegram carries credentials.
  • Bitwarden CLI for the bitwarden MCP server (added by claude.sh): bw config server <your Vaultwarden URL> && bw login --apikey (Vaultwarden, tailnet-only; personal API key from web vault → Settings → Security → Keys, because the CLI cannot do WebAuthn 2FA and plain bw login fails with "No providers available for this client"). Agents then call its unlock tool, which asks for the master password in a native dialog; lock ends the session.
  • Desktop app (chat/Cowork), with the app quit (a running app rewrites the file from memory): add chrome-devtools (npx -y chrome-devtools-mcp@latest --no-usage-statistics --isolated --config ~/.config/cd4a/config.json, absolute paths; --isolated because the app also hands the server to Code sessions, and two copies cannot share one Chrome profile) to mcpServers in ~/Library/Application Support/Claude/claude_desktop_config.json. cd4a/.config/cd4a/config.json turns on the opt-in memory-analysis and PWA tools; released versions read it only via --config.
  • Second desktop profile ("Claude Work"): open -n -a /Applications/Claude.app --args --user-data-dir="$HOME/.claude-instances/work" (its config is ~/.claude-instances/work/claude_desktop_config.json).

TODO

  • Warn about exiting from the git commit message template on non-empty message.
  • If possible, simplify the GPG signature sign in git log to make it smaller but still present.
  • Use markdownlint for the documentation.
  • Run prettier on md/yml/etc. on pre-commit.
  • Use shfmt + shellcheck + checkbashisms on scripts from dotfiles + document it.
  • Align all shell scripts with Google shell scripting guidelines + apply all the linting.
  • Run CI with pre-commit hooks.
  • Use git subtree instead of git module to manage dependencies.

Useful links

Literature

About

Dotfiles for macOS

Topics

Resources

Code of conduct

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages