Skip to content

feat: migrate from homebrew to nix with home-manager#129

Draft
Copilot wants to merge 5 commits intomasterfrom
copilot/migrate-from-brew-to-nix
Draft

feat: migrate from homebrew to nix with home-manager#129
Copilot wants to merge 5 commits intomasterfrom
copilot/migrate-from-brew-to-nix

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 26, 2026

  • Explore repository structure and understand current Homebrew/Nix setup
  • Research nix-darwin homebrew module (options, prefix, caskArgs, etc.)
  • Create darwin.nix — nix-darwin macOS configuration with declarative Homebrew casks
  • Update flake.nix — add nix-darwin input, create darwinConfigurations for macOS, keep homeConfigurations for Linux
  • Update home.nix — add ruby-install package (used with chruby)
  • Delete .brew — no longer needed, all cask management is in darwin.nix
  • Update Makefile — replace run-brew/install-homebrew with run-darwin, add install-rubies, keep run-nix for Linux
  • Update .bashrc — update comments to reflect nix-darwin management
  • Update .aliases — update update() function to use darwin-rebuild
  • Update README.md — document nix-darwin setup and usage
  • Run make test to validate changes
  • Run parallel validation and address feedback
  • Remove unused casks: iterm2, keybase, omnigraffle, vagrant, virtualbox

Copilot AI and others added 2 commits March 26, 2026 10:01
Move all CLI tools from Homebrew to a declarative Nix home-manager
configuration (flake.nix + home.nix). Homebrew is retained solely for
GUI / cask applications (browsers, fonts, desktop apps).

- Add flake.nix with multi-platform home-manager support
- Add home.nix declaring all CLI packages previously in .brew
- Slim down .brew to GUI / cask-only installs
- Update Makefile with run-nix target and stow ignores
- Update .profile and .bashrc to source Nix paths
- Update .gitignore for Nix build artifacts
- Update README.md with Nix installation and usage docs

Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bdossantos/dotfiles/sessions/839644e4-65a7-4221-aa3c-fdc6dbf749bd
- Quote --proto flag in Makefile echo text for clarity
- Convert update alias to a function with proper command checks

Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
Agent-Logs-Url: https://github.com/bdossantos/dotfiles/sessions/839644e4-65a7-4221-aa3c-fdc6dbf749bd
Replace the Homebrew .brew shell script with a declarative nix-darwin
configuration (darwin.nix). On macOS, a single `darwin-rebuild switch`
now manages CLI tools (via home-manager), GUI/cask apps (via Homebrew
module), and system settings.

- Add darwin.nix with homebrew.casks and system config
- Update flake.nix with nix-darwin input and darwinConfigurations
- Add ruby-install to home.nix
- Remove .brew (fully replaced by darwin.nix)
- Update Makefile with run-darwin target, install-rubies, remove
  install-homebrew and run-brew
- Update .bashrc, .profile, .aliases, README.md

Agent-Logs-Url: https://github.com/bdossantos/dotfiles/sessions/2faa8162-bb22-410f-8c13-72ec4551de09

Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
Comment thread darwin.nix Outdated
"google-chrome"
"gpg-suite"
"imageoptim"
"iterm2"
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot I don't need iterm2, keybase, omnigraffle, vagrant and virtualbox anymore

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed iterm2, keybase, omnigraffle, vagrant, and virtualbox from the casks list in a021b7f.

- Fix OS variable expansion in Makefile (use $(shell uname))
- Rename CHRUBY_SH to CHRUBY_DIR for clarity
- Add comment explaining useUserPackages = false choice

Agent-Logs-Url: https://github.com/bdossantos/dotfiles/sessions/2faa8162-bb22-410f-8c13-72ec4551de09

Co-authored-by: bdossantos <245284+bdossantos@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants