Prompting My Mac

Last week, I decided my Dock icons were too large. Instead of navigating through System Settings, I ran a single command: nix-ask "make my dock icons smaller".

Within thirty seconds, the change was live. Claude Code had opened my Nix configuration, found the Darwin module, dropped the tilesize from 96 to 48, and rebuilt the system. This works because when a machine is defined entirely in code, an AI doesn't have to guess where a setting is hidden; it simply reads the map.

Most macOS setups are a fragmented collection of .zshrc files, JSON snippets, and manual UI toggles. For an AI agent, this is a maze. In contrast, a Nix flake provides a structured hierarchy that is easy for a language model to parse:

flake.nix
├── modules/darwin/system.nix   # OS-level: Dock, Finder, Keyboard
├── home/packages.nix           # CLI & GUI applications
└── home/programs/neovim.nix    # Editor-specific configuration

This structure makes room for high-level requests that touch multiple layers of the OS at once. When I wanted to start a project in Go, I didn't install a single binary by hand. I just told the AI I needed a Go development environment, and it added the compiler to my package list and wired up the gopls language server inside my Neovim module. A minute later I was writing code in a fully equipped environment.

The same principle applies to aesthetics. Changing a system theme is usually tedious work, since it means keeping the terminal, the editor, and the system UI in sync. I recently asked for the "Catppuccin Mocha" theme across my entire stack, and the AI updated my terminal colors, fzf variables, and Neovim theme in one pass. Because the whole configuration is versioned in Git and managed by Nix, the risk is negligible: if I dislike a change, a git checkout or a Nix rollback snaps the system back to its previous state instantly.

The goal isn't to be "lazy" with configuration so much as to strip the friction out of system maintenance. A small alias bridges the gap:

nix-ask() {
  (cd ~/nix-config && claude --dangerously-skip-permissions "$*")
}

Nix is famous for its steep learning curve, but AI flattens it. You don't have to be a Nix expert to keep a perfectly managed machine; you just need a configuration an AI can reason about. My Mac has gone from a pile of settings I have to manage to a system I can simply talk to.