zhaofengli / nix-homebrew

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

Feature Request: Ability to define your casks and formulas #20

Open Eveeifyeve opened 8 months ago

Eveeifyeve commented 8 months ago

I think this would be great that way people can fully use nix with brew. All you have to do is brew install for formulas and brew install --casks for casks to implement it. I have took inspiration from Nix-Darwin HomeBrew Casks and Nix-Darwin HomeBrew Formulas.

Example config ref:

...
nix-homebrew.darwinModules.nix-homebrew {
 nix-homebrew = {
  casks = ["spotify", "wezterm", "iterm"]; # Example casks
  formulas = ["spotifyd", "bun"]; # Example formulas
  };
}
genebean commented 7 months ago

Isn't this an example exactly that? https://github.com/genebean/dots/blob/b2f97f3e41ee1a3347d2d2b05dae4e2dcfe3eab9/modules/system/common/all-darwin.nix#L23-L82

Just remembered that this may be coming from nix-darwin...

Eveeifyeve commented 7 months ago

Yeh it's from nix darwin but it:

  1. Requires homebrew
  2. Doesn't work with nix-homebrew
  3. Nix hombrew is a thing it should really have the ability to do this.
zhaofengli commented 7 months ago

I'm not using the homebrew-bundle integration in nix-darwin myself, but others are and it supposedly works (#19). What error are you getting?

Eveeifyeve commented 7 months ago

Homebrew nmot installed on rebuild

Eveeifyeve commented 6 months ago

But also it might be worth it since people do want to homebrew but I felt like the hombrew option in nix-darwin is a bit much when your using nix-homebrew