@@ -42,7 +42,7 @@ Here's how I've organized everything:
4242│ │ ├── defaults.nix # macOS system preferences
4343│ │ ├── dock.nix # Dock configuration
4444│ │ └── git.nix # macOS-specific Git setup
45- │ └── aarch64-linux/ # ARM Linux configurations
45+ │ └── aarch64-linux/ # ARM Linux configurations
4646│ ├── ec2.nix # EC2-specific Home Manager configuration
4747│ ├── vagrant.nix # Vagrant VM configuration
4848│ ├── default.nix # System configuration
@@ -74,11 +74,11 @@ Setting up on macOS with Apple Silicon is pretty straightforward:
7474 ``` bash
7575 # Install Nix
7676 sh <( curl -L https://nixos.org/nix/install)
77-
77+
7878 # Enable flakes (minimal bootstrap configuration)
7979 mkdir -p ~ /.config/nix
8080 echo " experimental-features = nix-command flakes" > ~ /.config/nix/nix.conf
81-
81+
8282 # Install nix-darwin
8383 nix-build https://github.com/LnL7/nix-darwin/archive/master.tar.gz -A installer
8484 ./result/bin/darwin-installer
@@ -127,7 +127,7 @@ Want to use this on multiple Macs? No problem! You can have different settings f
127127 username = "your-username";
128128 dockApps = [
129129 "/Applications/Safari.app"
130- "/Applications/Mail.app"
130+ "/Applications/Mail.app"
131131 "/Applications/Visual Studio Code.app"
132132 ];
133133 };
@@ -146,7 +146,7 @@ Here's my favorite part - the VM setup! If you've got an Apple Silicon Mac, UTM
146146 ``` bash
147147 # Apply your nix-darwin config to install UTM and Vagrant
148148 darwin-rebuild switch --flake ~ /.config/nix#macbook
149-
149+
150150 # Install the Vagrant UTM plugin
151151 vagrant plugin install vagrant-utm
152152 ```
@@ -156,7 +156,7 @@ Here's my favorite part - the VM setup! If you've got an Apple Silicon Mac, UTM
156156 cd ~ /.config/nix
157157 vagrant up
158158 ```
159-
159+
160160 ** Heads up** : The first time you do this:
161161 - UTM will ask for permission (just say yes)
162162 - Your terminal will ask if you want to download the VM image (say yes to that too)
@@ -167,7 +167,7 @@ Here's my favorite part - the VM setup! If you've got an Apple Silicon Mac, UTM
167167 ``` bash
168168 # Quick way - SSH from your terminal
169169 vagrant ssh
170-
170+
171171 # Or get the VM's IP for connecting with VS Code
172172 ip addr show | grep " inet " | grep -v 127.0.0.1
173173 ```
@@ -191,7 +191,7 @@ Here's my favorite part - the VM setup! If you've got an Apple Silicon Mac, UTM
191191 PubkeyAcceptedKeyTypes +ssh-rsa
192192 HostKeyAlgorithms +ssh-rsa
193193 ```
194-
194+
195195 - In VS Code, open the Command Palette (⇧⌘P) and run "Remote-SSH: Connect to Host..."
196196 - Select "nix-dev" from the list
197197 - Open the `/vagrant` folder - it's synced with your host's nix config
@@ -212,7 +212,7 @@ Here's my favorite part - the VM setup! If you've got an Apple Silicon Mac, UTM
212212 ``` bash
213213 # From your Mac
214214 vagrant provision
215-
215+
216216 # Or from inside the VM
217217 cd ~ /.config/nix
218218 nix run home-manager/master -- switch --flake ~ /.config/nix#vagrant --impure
@@ -235,15 +235,15 @@ Want to take your development environment to the cloud? Here's how to set up you
235235 # Add Tailscale's package repository
236236 curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg > /dev/null
237237 curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/jammy.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
238-
238+
239239 # Install Tailscale
240240 sudo apt-get update
241241 sudo apt-get install -y tailscale
242-
242+
243243 # Start and authenticate Tailscale
244244 # This will output a URL to authenticate your instance
245245 sudo tailscale up
246-
246+
247247 # Open the URL in your browser and authenticate the machine
248248 # Once authenticated, note the tailscale hostname (e.g., "ec2-dev.example.tailnet.ts.net")
249249 tailscale status
@@ -259,13 +259,13 @@ Want to take your development environment to the cloud? Here's how to set up you
259259 ``` bash
260260 # Update system packages first
261261 sudo apt update && sudo apt upgrade -y
262-
262+
263263 # Install required dependencies
264264 sudo apt install -y curl git xz-utils
265-
265+
266266 # Install Nix with daemon (multi-user install)
267267 sh <( curl -L https://nixos.org/nix/install) --daemon
268-
268+
269269 # Reload shell to get Nix in PATH
270270 . /etc/profile.d/nix.sh
271271 ```
@@ -282,7 +282,7 @@ Want to take your development environment to the cloud? Here's how to set up you
282282 ``` nix
283283 homeConfigurations = {
284284 # ...existing vagrant configuration...
285-
285+
286286 # EC2 instance configuration
287287 "ec2" = home-manager.lib.homeManagerConfiguration {
288288 pkgs = nixpkgsWithOverlays "aarch64-linux";
@@ -315,13 +315,13 @@ Want to take your development environment to the cloud? Here's how to set up you
315315 {
316316 # EC2-specific configuration
317317 # This will override or extend the base vagrant configuration
318-
318+
319319 # Additional packages specific to EC2 environment
320320 home.packages = with pkgs; [
321321 awscli2
322322 amazon-ecr-credential-helper
323323 ];
324-
324+
325325 # EC2-specific Git configuration
326326 programs.git.extraConfig = {
327327 credential.helper = "!aws codecommit credential-helper $@";
@@ -335,7 +335,7 @@ Want to take your development environment to the cloud? Here's how to set up you
335335 # Enable flakes
336336 mkdir -p ~/.config/nix
337337 echo "experimental-features = nix-command flakes" > ~/.config/nix/nix.conf
338-
338+
339339 # Apply the EC2-specific configuration
340340 export NIXPKGS_ALLOW_UNFREE=1
341341 nix run home-manager/master -- switch --flake ~/.config/nix#ec2 --impure
@@ -375,10 +375,10 @@ I've set up two super handy version managers in the VM that make switching betwe
375375 ``` bash
376376 # Grab any Terraform version you want
377377 tfenv install 1.5.0
378-
378+
379379 # Switch versions with a single command
380380 tfenv use 1.5.0
381-
381+
382382 # See what you've got installed
383383 tfenv list
384384 ```
@@ -387,10 +387,10 @@ I've set up two super handy version managers in the VM that make switching betwe
387387 ``` bash
388388 # Install Node versions like candy
389389 nvm install 18
390-
390+
391391 # Hop between versions instantly
392392 nvm use 16
393-
393+
394394 # Check what you've got
395395 nvm list
396396 ```
@@ -410,7 +410,7 @@ Keeping everything up to date is super simple:
410410# Pull latest changes
411411git pull
412412
413- # Apply configuration
413+ # Apply configuration
414414darwin-rebuild switch --flake ~ /.config/nix#macbook
415415```
416416
@@ -554,4 +554,4 @@ Here are a few things I've learned along the way:
554554
555555## 📄 License
556556
557- This setup is my personal configuration, but I'm sharing it under the MIT license. Feel free to borrow ideas, adapt it, or use it as inspiration for your own perfect dev environment!
557+ This setup is my personal configuration, but I'm sharing it under the MIT license. Feel free to borrow ideas, adapt it, or use it as inspiration for your own perfect dev environment!
0 commit comments