Reproducible macOS (and Linux) system configuration managed by nix-darwin, home-manager, and YADM.
One command. New Mac. Full system.
curl -fsSL https://raw.githubusercontent.com/AndreJorgeLopes/dot-files/main/.config/nix-darwin/scripts/bootstrap-fresh-mac.sh | bashInstalls Nix, clones dotfiles, builds the system, and runs interactive setup. If the build fails, it offers AI-assisted debugging via Claude Code or OpenCode.
753 tracked files across macOS and Linux configurations.
.config/
nix-darwin/ Declarative macOS system (packages, defaults, services)
zsh/ Shell config (modular: aliases, functions, keybinds, env)
ghostty/ Terminal emulator + custom GLSL cursor shaders
yabai/ Tiling window manager
skhd/ Hotkey daemon
sketchybar/ Custom menu bar
hammerspoon/ macOS automation (Lua)
nvim/ Neovim configuration
alttab/ Window switcher settings
fastfetch/ System info display + pokemon variant
mise/ Tool version management (node, python, etc.)
hypr/ Hyprland (Linux wayland compositor)
...and 30+ more
.claude/ AI agent configuration
agents/ Specialized Datadog alert triage agents
skills/ Claude Code skills (devflow, monitoring, flights)
hooks/ Pre-commit review, permission sync
commands/ Flight search, README generation
Brewfile Homebrew package declarations (managed by nix-darwin)
nix-rebuild
|
+-------------+-------------+
| |
nix-darwin home-manager
(system scope) (user scope)
| |
+-----+-----+ +-----+-----+
| | | | | |
packages homebrew macOS zsh git ssh
(nix) (casks) defaults (omz) (delta) (keychain)
|
LaunchAgents
(capslock, hindsight)
|
activation scripts
|
bootstrap-extras.sh auto
(brew services, devflow,
git clones, npm tools)
| Layer | Tool | What it manages |
|---|---|---|
| System packages | Nix | CLI tools: git, eza, fzf, ripgrep, bat, neovim, tmux, etc. |
| GUI apps | Homebrew (via nix-darwin) | Ghostty, Arc, 1Password, Cursor, Slack, Raycast, etc. |
| macOS preferences | nix-darwin system.defaults |
Dock, keyboard layout, Hammerspoon config path |
| Services | nix-darwin launchd |
CapsLock no-delay, Hindsight AI memory daemon |
| Shell | home-manager | Zsh + Oh My Zsh, environment variables, PATH |
| Dev tools | home-manager + scripts | Git (delta), SSH (keychain), language servers |
| Dotfiles | YADM | Everything in .config/ — gradually migrating to home-manager |
| Escape hatches | bootstrap-extras.sh | Interactive setup, git clones, devflow, GitHub releases |
Six-layer AI-assisted development stack:
- Hindsight — Persistent memory across Claude Code sessions (vector DB + embeddings)
- Agent Deck — tmux-based session manager for parallel AI agents
- Worktrunk — Git worktree manager for isolated feature branches
- Code Review — Automated review via Claude Code
- Process Discipline — Skills, hooks, and CLAUDE.md conventions
- Langfuse — LLM observability and tracing
curl -fsSL https://raw.githubusercontent.com/AndreJorgeLopes/dot-files/main/.config/nix-darwin/scripts/bootstrap-fresh-mac.sh | bashThis runs through:
- Xcode CLI tools
- Determinate Nix installation
- Homebrew installation
- Dotfiles clone via YADM
- System state backup (safety net)
darwin-rebuild build(dry-run — catches errors before changing anything)- If build fails: AI-assisted debugging (Claude Code / OpenCode)
darwin-rebuild switch(activates the configuration)- Interactive first-time setup (SSH keys, git identity, permissions)
nix-rebuild # Build and activate system configuration
nix-rebuild build # Safe dry-run (nothing changes)
nix-rebuild check # Fast syntax validation
nix-rebuild rollback # Instant revert to previous generation
nix-rebuild generations # List all past generationsVerify Homebrew state, then tighten cleanup:
# See what Homebrew packages are NOT declared in nix-darwin:
brew bundle cleanup --verbose
# If the list looks right (safe to remove), change in configuration.nix:
# cleanup = "none" -> cleanup = "uninstall"
# Then:
nix-rebuildAfter the automated setup, these require manual intervention:
- SIP — Partially disable for yabai:
csrutil enable --without fs --without debug --without nvram - Mission Control — Create 8 desktops
- Accessibility — Grant permissions for yabai, skhd, AltTab, Hammerspoon
- Hindsight — Grant Full Disk Access to the Python binary
yabai (tiling) + skhd (hotkeys) + SketchyBar (menu bar) + AltTab (window switcher)
8 spaces, BSP layout, custom keybindings. SIP partially disabled for scripting addition.
Ghostty with JetBrains Mono Nerd Font, custom GLSL cursor shaders (amethyst whisper trail effect), 90% opacity with background blur.
These dotfiles work on both macOS and Linux (Arch/Hyprland). YADM alternates handle platform differences. The Nix configuration is macOS-only; Linux uses Hyprland, Waybar, rofi, and other Wayland tools configured via standard dotfiles.
~/.config/nix-darwin/
flake.nix Entry point — nixpkgs + nix-darwin + home-manager
configuration.nix System: packages, Homebrew, defaults, LaunchAgents
home.nix User: zsh, git, ssh, env vars
scripts/
nix-rebuild Wrapper: check / build / switch / rollback
bootstrap-extras.sh Auto mode (activation) + first-time (interactive)
bootstrap-fresh-mac.sh One-liner for fresh Mac setup
Personal configuration files. Feel free to reference or adapt for your own setup.