zhaofengli / nix-homebrew

Homebrew installation manager for nix-darwin
MIT License
277 stars 13 forks source link

New nix-darwin check prevents the "nix-homebrew performs brew installation" use case from working #45

Closed zehauser closed 1 week ago

zehauser commented 2 weeks ago

I just tried to run darwin-rebuild on a system with no Homebrew, with a Nix config that specified homebrew packages and casks and also uses nix-homebrew to manage (and install) Homebrew. It failed with this error:

error: Using the homebrew module requires homebrew installed, aborting activation
Homebrew doesn't seem to be installed. Please install homebrew separately.

This check was recently added in this PR: https://github.com/LnL7/nix-darwin/pull/961.

Hopefully we can hook into this check and interoperate with it to make this use case work again! If I have a chance next week I'll pop in and try to propose a PR (either here or in nix-darwin or both), but I'd be thrilled if someone else gets to it first. 😁

isabelroses commented 1 week ago

I created a PR upstream: https://github.com/LnL7/nix-darwin/pull/1178

In the mean time the best solution we have now is installing homebrew imperatively and setting nix-homebrew.autoMigrate = true;

zehauser commented 1 week ago

@isabelroses Thank you for following up on this!