This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a comprehensive dotfiles repository that manages system configuration across multiple machines using Nix. It supports:
- macOS systems (both Intel and ARM)
- NixOS systems
The repository uses Nix Flakes for declarative system and user environment configuration.
igm-switch # Apply changes and rebuild system configurationigm-update # Update all Nix flake dependencies and format code
igm-switch # Apply the updatesnix fmt # Format all files (Nix, shell, Markdown, YAML, JSON)cachix-push-m1-config # Push M1 Darwin configuration to CachixThe repository uses flake-parts with partitions:
/flake.nix: Main flake using flake-parts- Platform-specific inputs are isolated via partitions:
nix/darwin/flake.nix: Darwin partition inputs (nix-darwin, home-manager, nix-casks, etc.)nix/nixos/flake.nix: NixOS partition inputs
- Private configurations (
~/dotfiles-private) are injected at build time via--override-input dotfiles-private; a stub atgithub:macalinao/dotfiles-private-stubis used by default (for CI)
/nix/: Core Nix configurationsdarwin/: macOS-specific system configurationhome/: Home Manager user environment configurationnixos/: NixOS system configurationshells/: Development shells for various languages
/scripts/: Helper scripts (igm-* commands)/config/: Application configurations (VSCode, Cursor, Claude Code)
- Configurations are defined in Nix files under
/nix/ igm-switchbuilds and applies configurations based on the current platform- Private configurations are managed separately in
~/dotfiles-private
- Always commit changes before running
igm-switch, as it reads from the git tree - Always use
igm-switchto apply configuration changes, not raw Nix commands - The repository uses platform detection to determine which flake to use
- Run
nix fmtbefore committing to format files - Private configurations are updated automatically when running
igm-switch
Claude Code settings are stored in /config/claude/. See config/claude/CLAUDE.md for documentation on the settings format and organization guidelines.