Skip to content

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

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

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

Conversation

Copy link
Contributor

Copilot AI commented Mar 26, 2026

Migrate CLI tooling from Homebrew to declarative Nix home-manager. Homebrew retained solely for GUI/cask apps per the recommended approach.

New files

  • flake.nix — Multi-platform home-manager flake (aarch64-darwin, x86_64-darwin, x86_64-linux, aarch64-linux)
  • home.nix — All CLI packages declared here (~80 packages migrated from .brew)

.brew → casks only

Stripped all CLI formulae. What remains: 1password, Firefox, Chrome, Ghostty, Spotify, VLC, fonts, gcloud-cli, and other GUI apps.

Shell integration

  • .profile — Sources nix-daemon profile, prepends ~/.nix-profile/bin to PATH, adds Nix man pages
  • .bashrc — Sources hm-session-vars.sh, Nix bash completions; chruby resolution now checks Nix profile before Homebrew

Build system

  • Makefile — New run-nix target with auto-detected NIX_SYSTEM; install now includes run-nix; stow ignores for flake.nix, flake.lock, home.nix
  • .aliasesupdate converted from alias to function, adds nix flake update + home-manager switch

Usage

# Apply CLI tool changes
make run-nix

# Install GUI apps
make run-brew

# Add a new CLI tool: edit home.nix, then
make run-nix

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