diff --git a/flake.nix b/flake.nix index 5ae661f..174119c 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,17 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew"; + + homebrew-core = { + url = "github:homebrew/homebrew-core"; + flake = false; + }; + homebrew-cask = { + url = "github:homebrew/homebrew-cask"; + flake = false; + }; + hosts = { url = "github:StevenBlack/hosts"; #flake = false; @@ -61,6 +72,9 @@ ghostty, nixos-cosmic, nh_darwin, + nix-homebrew, + homebrew-core, + homebrew-cask, ... } @ inputs: let overlays = [ @@ -100,6 +114,30 @@ "Natalies-MacBook-Air" = darwin.lib.darwinSystem { system = "aarch64-darwin"; modules = [ + nix-homebrew.darwinModules.nix-homebrew + { + nix-homebrew = { + # Install Homebrew under the default prefix + enable = true; + + # Apple Silicon Only: Also install Homebrew under the default Intel prefix for Rosetta 2 + enableRosetta = true; + + # User owning the Homebrew prefix + user = "yourname"; + + # Optional: Declarative tap management + taps = { + "homebrew/homebrew-core" = homebrew-core; + "homebrew/homebrew-cask" = homebrew-cask; + }; + + # Optional: Enable fully-declarative tap management + # + # With mutableTaps disabled, taps can no longer be added imperatively with `brew tap`. + mutableTaps = false; + }; + } # nh_darwin.nixDarwinModules.default {nixpkgs.overlays = overlays;} ./hosts/laptop/configuration.nix