Skip to content

Commit 86571c9

Browse files
committed
Update README to reflect current configuration
- Fix hostname references from #macbook to #rick - Replace extensive Vagrant sections with Claude Code integration - Add comprehensive Claude Code/MCP server documentation - Update structure section to include claude-code directory - Modernize usage instructions and common tasks - Remove outdated VM-focused workflow descriptions
1 parent e5378cc commit 86571c9

File tree

1 file changed

+59
-104
lines changed

1 file changed

+59
-104
lines changed

README.md

Lines changed: 59 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,21 @@
44

55
Hey! This is just my Nix setup that I've put together over time to make coding easier. I got some ideas from Mitchell Hashimoto's approach to dev environments and tweaked things to work for me.
66

7-
I like to keep my Mac clean and organized while still having access to all the tools I need for development. That's why I set things up this way: I use my Mac for everyday tasks, but I do all my actual coding and development work in a Vagrant-managed UTM VM.
7+
I like to keep my Mac clean and organized while still having access to all the tools I need for development. This configuration manages my macOS system with nix-darwin and can also set up Linux development environments for cloud or local development.
88

99
Here's why I love this setup:
1010

11-
- **My host stays clean** - No more dependency issues
12-
- **I can experiment freely** - Breaking my dev environment doesn't affect my system
13-
- **It's consistent** - My dev environment feels the same on all my devices
14-
- **Best of both worlds** - macOS for daily tasks, Linux for development
15-
- **My settings follow me everywhere** - Shared ZSH configs keep my shell experience consistent
11+
- **My host stays clean** - Nix manages dependencies declaratively
12+
- **It's consistent** - My dev environment feels the same across devices
13+
- **Best of both worlds** - macOS for daily tasks, with Linux options for development
14+
- **My settings follow me everywhere** - Shared configurations keep everything consistent
15+
- **Claude Code integration** - Automated MCP server setup for enhanced AI coding assistance
1616

17-
This is my take on a flexible Nix configuration that manages both my macOS system and my Linux development VM. It works for me, and maybe it'll give you some ideas for your own setup!
17+
This is my take on a flexible Nix configuration that manages macOS systems and can provision Linux development environments. It works for me, and maybe it'll give you some ideas for your own setup!
1818

19-
- 🍎 **macOS**: Using nix-darwin for system configuration and Homebrew for applications
20-
- 🐧 **Linux/UTM VM**: Using Home Manager for user environment configuration
19+
- 🍎 **macOS**: Using nix-darwin for system configuration and Homebrew for applications
20+
- 🐧 **Linux**: Using Home Manager for development environments (local or cloud)
21+
- 🤖 **Claude Code**: Automated MCP server configuration for AI-powered development
2122

2223
## 📁 Structure
2324

@@ -28,9 +29,14 @@ Here's how I've organized everything:
2829
├── flake.nix # Main entry point for the Nix flake
2930
├── flake.lock # Lock file for flake dependencies
3031
├── nix.conf # Global Nix settings
31-
├── Vagrantfile # Definition for Vagrant VM development environment
32+
├── Vagrantfile # Legacy Vagrant configuration (kept for reference)
3233
├── common/ # Shared configuration
3334
│ ├── default.nix # Common packages and settings
35+
│ ├── claude-code/ # Claude Code integration
36+
│ │ ├── default.nix # Claude Code and MCP server setup
37+
│ │ ├── settings.json # Claude Code settings
38+
│ │ ├── CLAUDE.md # Claude Code instructions
39+
│ │ └── commands/ # Custom Claude Code commands
3440
│ └── zsh/ # Shared ZSH configuration
3541
│ ├── default.nix # ZSH module definition
3642
│ ├── default.omp.json # Oh-My-Posh theme
@@ -41,17 +47,21 @@ Here's how I've organized everything:
4147
│ │ ├── homebrew.nix # Homebrew packages and settings
4248
│ │ ├── defaults.nix # macOS system preferences
4349
│ │ ├── dock.nix # Dock configuration
44-
│ │ └── git.nix # macOS-specific Git setup
50+
│ │ ├── git.nix # macOS-specific Git setup
51+
│ │ └── zed/ # Zed editor configuration
4552
│ └── aarch64-linux/ # ARM Linux configurations
4653
│ ├── ec2.nix # EC2-specific Home Manager configuration
47-
│ ├── vagrant.nix # Vagrant VM configuration
54+
│ ├── vagrant.nix # Legacy VM configuration
4855
│ ├── default.nix # System configuration
49-
│ ├── git.nix # VM-specific Git configuration
50-
│ └── zsh.nix # VM-specific ZSH setup
56+
│ ├── git.nix # Linux-specific Git configuration
57+
│ └── zsh.nix # Linux-specific ZSH setup
5158
├── overlays/ # Custom Nix overlays
5259
│ └── tfenv.nix # Terraform Version Manager overlay
5360
├── packer/ # Packer templates
5461
│ └── aws-ec2.pkr.hcl # AWS EC2 instance configuration
62+
└── .github/ # GitHub Actions workflows
63+
└── workflows/
64+
└── pre-commit.yml # Code quality and formatting checks
5565
```
5666

5767
## 🛠️ Installation
@@ -92,8 +102,8 @@ Setting up on macOS with Apple Silicon is pretty straightforward:
92102

93103
3. Apply it to your Mac:
94104
```bash
95-
# For the default configuration (hostname: macbook)
96-
darwin-rebuild switch --flake ~/.config/nix#macbook
105+
# For the rick configuration (your actual hostname)
106+
darwin-rebuild switch --flake ~/.config/nix#rick
97107
```
98108

99109
### 🌩️ Cloud Deployment with Packer {#-cloud-deployment-with-packer}
@@ -139,93 +149,41 @@ Want to use this on multiple Macs? No problem! You can have different settings f
139149
darwin-rebuild switch --flake ~/.config/nix#your-hostname
140150
```
141151

142-
### 🖥️ UTM + Vagrant Setup (Apple Silicon)
152+
### 🤖 Claude Code Integration
143153

144-
Here's my favorite part - the VM setup! If you've got an Apple Silicon Mac, UTM + Vagrant is a match made in heaven. You get the speed of native ARM virtualization with the convenience of Vagrant's declarative VM management:
154+
This configuration includes automated setup for Claude Code with MCP (Model Context Protocol) servers:
145155

146-
1. First, grab the basics:
147-
148-
```bash
149-
# Apply your nix-darwin config to install UTM and Vagrant
150-
darwin-rebuild switch --flake ~/.config/nix#macbook
151-
152-
# Install the Vagrant UTM plugin
153-
vagrant plugin install vagrant-utm
154-
```
155-
156-
2. Fire up the VM:
157-
158-
```bash
159-
cd ~/.config/nix
160-
vagrant up
161-
```
162-
163-
**Heads up**: The first time you do this:
164-
165-
- UTM will ask for permission (just say yes)
166-
- Your terminal will ask if you want to download the VM image (say yes to that too)
167-
- It'll download the Ubuntu ARM64 VM image (~600MB)
168-
- Then it'll set up Nix and all your dev tools automatically
169-
170-
3. Jump into the VM:
171-
172-
```bash
173-
# Quick way - SSH from your terminal
174-
vagrant ssh
175-
176-
# Or get the VM's IP for connecting with VS Code
177-
ip addr show | grep "inet " | grep -v 127.0.0.1
178-
```
179-
180-
4. Connect with VS Code Remote-SSH:
181-
182-
- Install the "Remote - SSH" extension in VS Code
183-
- Your SSH configuration is automatically maintained by the Nix configuration in `systems/aarch64-darwin/default.nix`
184-
- The SSH config includes all the settings needed to connect to your Vagrant VM:
185-
186-
```
187-
Host nix-dev
188-
HostName 127.0.0.1
189-
User vagrant
190-
Port 2222
191-
UserKnownHostsFile /dev/null
192-
StrictHostKeyChecking no
193-
PasswordAuthentication no
194-
IdentityFile /Users/svenlito/.config/nix/.vagrant/machines/default/utm/private_key
195-
IdentitiesOnly yes
196-
LogLevel FATAL
197-
ForwardAgent yes
198-
PubkeyAcceptedKeyTypes +ssh-rsa
199-
HostKeyAlgorithms +ssh-rsa
200-
```
201-
202-
- In VS Code, open the Command Palette (⇧⌘P) and run "Remote-SSH: Connect to Host..."
203-
- Select "nix-dev" from the list
204-
- Open the `/vagrant` folder - it's synced with your host's nix config
205-
- Or open `~/.config/nix` to work directly with your configuration
156+
```bash
157+
# Claude Code and MCP servers are automatically installed and configured
158+
# when you apply the nix-darwin configuration
159+
darwin-rebuild switch --flake ~/.config/nix#rick
160+
```
206161

207-
**Note**: The SSH configuration is automatically applied during system activation, so any changes made to the configuration in `systems/aarch64-darwin/default.nix` will be applied when you run `darwin-rebuild switch`.
162+
**Included MCP servers:**
163+
- **context7**: Documentation and context retrieval
164+
- **code-reasoning**: Code analysis and reasoning capabilities
165+
- **sequential-thinking**: Step-by-step problem solving
208166

209-
5. Some handy VM commands:
167+
The configuration automatically:
168+
- Installs Claude Code via npm
169+
- Configures MCP servers as user-scoped (available across all projects)
170+
- Sets up custom commands and workflows
171+
- Manages settings and documentation
210172

211-
```bash
212-
vagrant suspend # Take a coffee break (pauses the VM)
213-
vagrant resume # Back to work! (resumes the VM)
214-
vagrant halt # Calling it a day (stops the VM)
215-
vagrant destroy # Starting fresh (deletes the VM)
216-
vagrant provision # Apply new config changes
217-
```
173+
**Claude Code features:**
174+
- Custom commands for Linear integration
175+
- Sophisticated development workflows
176+
- Automated code quality checks
177+
- Context-aware AI assistance
218178

219-
6. Made some config tweaks? Apply them like this:
179+
### 🖥️ Local Development Options
220180

221-
```bash
222-
# From your Mac
223-
vagrant provision
181+
While this configuration previously included Vagrant VM setup, the focus has shifted to:
182+
- **Direct macOS development** with Nix managing dependencies
183+
- **Cloud development** using EC2 instances with Tailscale
184+
- **Claude Code integration** for AI-enhanced development
224185

225-
# Or from inside the VM
226-
cd ~/.config/nix
227-
nix run home-manager/master -- switch --flake ~/.config/nix#vagrant --impure
228-
```
186+
The Vagrant configuration files are retained for reference but are no longer actively maintained.
229187

230188
### ☁️ AWS EC2 + Ubuntu Setup
231189

@@ -418,20 +376,17 @@ Keeping everything up to date is super simple:
418376
git pull
419377

420378
# Apply configuration
421-
darwin-rebuild switch --flake ~/.config/nix#macbook
379+
darwin-rebuild switch --flake ~/.config/nix#rick
422380
```
423381

424-
#### 🐧 Vagrant VM:
382+
#### ☁️ EC2 Instance:
425383

426384
```bash
427385
# Pull latest changes
428386
git pull
429387

430-
# Rebuild VM with latest configuration
431-
vagrant provision
432-
433-
# Or if you're already in the VM, you can run:
434-
nix run home-manager/master -- switch --flake ~/.config/nix#vagrant --impure
388+
# Apply updated configuration
389+
nix run home-manager/master -- switch --flake ~/.config/nix#ec2 --impure
435390
```
436391

437392
### ✏️ Making Changes
@@ -452,11 +407,11 @@ Here's how to do all the usual stuff:
452407
- 🍺 Need a GUI app via Homebrew? Edit `systems/aarch64-darwin/homebrew.nix`
453408
- ⚙️ Tweaking macOS settings: Look in `systems/aarch64-darwin/defaults.nix`
454409
- 📱 Changing dock icons: Find your host in `flake.nix`
455-
- 🐧 Adding stuff to your VM: Edit `systems/aarch64-linux/vagrant.nix`
410+
- 🤖 Configuring Claude Code: Edit `common/claude-code/default.nix`
456411
- ☁️ Adding stuff to your EC2 instance: Edit `systems/aarch64-linux/ec2.nix`
457-
- 🖥️ Changing VM settings: It's all in `Vagrantfile`
458412
- ⚡ Modifying AWS EC2 image: Edit `packer/aws-ec2.pkr.hcl`
459413
- 🔄 Adding a custom tool: Create a new file in `overlays/` and add it to `flake.nix`
414+
- 🔧 Pre-commit hooks: Edit `.pre-commit-config.yaml`
460415

461416
### ☁️ AWS Configuration
462417

0 commit comments

Comments
 (0)