Skip to content

AndreJorgeLopes/dot-files

Repository files navigation

dotfiles

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 | bash

Installs Nix, clones dotfiles, builds the system, and runs interactive setup. If the build fails, it offers AI-assisted debugging via Claude Code or OpenCode.


What's inside

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)

Architecture

                    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)

Layers

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

AI Dev Environment (devflow)

Six-layer AI-assisted development stack:

  1. Hindsight — Persistent memory across Claude Code sessions (vector DB + embeddings)
  2. Agent Deck — tmux-based session manager for parallel AI agents
  3. Worktrunk — Git worktree manager for isolated feature branches
  4. Code Review — Automated review via Claude Code
  5. Process Discipline — Skills, hooks, and CLAUDE.md conventions
  6. Langfuse — LLM observability and tracing

Setup

Fresh Mac (automated)

curl -fsSL https://raw.githubusercontent.com/AndreJorgeLopes/dot-files/main/.config/nix-darwin/scripts/bootstrap-fresh-mac.sh | bash

This runs through:

  1. Xcode CLI tools
  2. Determinate Nix installation
  3. Homebrew installation
  4. Dotfiles clone via YADM
  5. System state backup (safety net)
  6. darwin-rebuild build (dry-run — catches errors before changing anything)
  7. If build fails: AI-assisted debugging (Claude Code / OpenCode)
  8. darwin-rebuild switch (activates the configuration)
  9. Interactive first-time setup (SSH keys, git identity, permissions)

Day-to-day

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 generations

After first switch

Verify 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-rebuild

Manual steps (one-time)

After 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

Window Management

yabai (tiling) + skhd (hotkeys) + SketchyBar (menu bar) + AltTab (window switcher)

8 spaces, BSP layout, custom keybindings. SIP partially disabled for scripting addition.

Terminal

Ghostty with JetBrains Mono Nerd Font, custom GLSL cursor shaders (amethyst whisper trail effect), 90% opacity with background blur.

Cross-platform

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.

Structure

~/.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

License

Personal configuration files. Feel free to reference or adapt for your own setup.

About

All my dot files and dot folders

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors