Skip to content

Commit f443f69

Browse files
committed
claude md
1 parent 0219d90 commit f443f69

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

CLAUDE.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Repository Overview
6+
7+
This is a comprehensive dotfiles repository that manages system configuration across multiple machines using Nix. It supports:
8+
9+
- macOS systems (both Intel and ARM)
10+
- NixOS systems
11+
12+
The repository uses Nix Flakes for declarative system and user environment configuration.
13+
14+
## Common Commands
15+
16+
### Applying Configuration Changes
17+
18+
```bash
19+
igm-switch # Apply changes and rebuild system configuration
20+
```
21+
22+
### Updating Dependencies
23+
24+
```bash
25+
igm-update # Update all Nix flake dependencies and format code
26+
igm-switch # Apply the updates
27+
```
28+
29+
### Development
30+
31+
```bash
32+
nix fmt # Format Nix files using nixfmt-rfc-style
33+
pnpm prepare # Set up git hooks (run after cloning)
34+
```
35+
36+
### Cachix Operations
37+
38+
```bash
39+
cachix-push-m1-config # Push M1 Darwin configuration to Cachix
40+
```
41+
42+
## Architecture
43+
44+
### Flake Structure
45+
46+
The repository uses a multi-flake architecture:
47+
48+
- `/flake.nix`: Development environment with formatting tools
49+
- `/nix/flake.nix`: Main system configuration flake
50+
- Platform-specific flakes are located in:
51+
- `~/dotfiles-darwin` (macOS)
52+
- `./private/flakes/nixos` (NixOS)
53+
54+
### Key Directories
55+
56+
- `/nix/`: Core Nix configurations
57+
- `darwin/`: macOS-specific system configuration
58+
- `home/`: Home Manager user environment configuration
59+
- `nixos/`: NixOS system configuration
60+
- `shells/`: Development shells for various languages
61+
- `private/`: Private configuration management
62+
- `/scripts/`: Helper scripts (igm-\* commands)
63+
- `/config/`: Application configurations (VSCode, Cursor)
64+
65+
### Configuration Flow
66+
67+
1. Configurations are defined in Nix files under `/nix/`
68+
2. `igm-switch` builds and applies configurations based on the current platform
69+
3. Git hooks ensure code is formatted before commits
70+
4. Private configurations are managed separately in `~/dotfiles-private`
71+
72+
## Important Notes
73+
74+
- Always use `igm-switch` to apply configuration changes, not raw Nix commands
75+
- The repository uses platform detection to determine which flake to use
76+
- Formatting is automatically applied on commit via lint-staged
77+
- Private configurations are updated automatically when running `igm-switch`

0 commit comments

Comments
 (0)