You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- 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
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.
6
6
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.
8
8
9
9
Here's why I love this setup:
10
10
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
-**Claude Code integration** - Automated MCP server setup for enhanced AI coding assistance
16
16
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!
18
18
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
21
22
22
23
## 📁 Structure
23
24
@@ -28,9 +29,14 @@ Here's how I've organized everything:
28
29
├── flake.nix # Main entry point for the Nix flake
29
30
├── flake.lock # Lock file for flake dependencies
30
31
├── nix.conf # Global Nix settings
31
-
├── Vagrantfile # Definition for Vagrant VM development environment
32
+
├── Vagrantfile # Legacy Vagrant configuration (kept for reference)
32
33
├── common/ # Shared configuration
33
34
│ ├── 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
34
40
│ └── zsh/ # Shared ZSH configuration
35
41
│ ├── default.nix # ZSH module definition
36
42
│ ├── default.omp.json # Oh-My-Posh theme
@@ -41,17 +47,21 @@ Here's how I've organized everything:
41
47
│ │ ├── homebrew.nix # Homebrew packages and settings
42
48
│ │ ├── defaults.nix # macOS system preferences
43
49
│ │ ├── dock.nix # Dock configuration
44
-
│ │ └── git.nix # macOS-specific Git setup
50
+
│ │ ├── git.nix # macOS-specific Git setup
51
+
│ │ └── zed/ # Zed editor configuration
45
52
│ └── aarch64-linux/ # ARM Linux configurations
46
53
│ ├── ec2.nix # EC2-specific Home Manager configuration
47
-
│ ├── vagrant.nix # Vagrant VM configuration
54
+
│ ├── vagrant.nix # Legacy VM configuration
48
55
│ ├── 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
51
58
├── overlays/ # Custom Nix overlays
52
59
│ └── tfenv.nix # Terraform Version Manager overlay
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:
145
155
146
-
1. First, grab the basics:
147
-
148
-
```bash
149
-
# Apply your nix-darwin config to install UTM and Vagrant
- 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
+
```
206
161
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
208
166
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
210
172
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
218
178
219
-
6. Made some config tweaks? Apply them like this:
179
+
### 🖥️ Local Development Options
220
180
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
224
185
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.
229
187
230
188
### ☁️ AWS EC2 + Ubuntu Setup
231
189
@@ -418,20 +376,17 @@ Keeping everything up to date is super simple:
0 commit comments