1 files changed, 38 insertions(+), 0 deletions(-)
flake.nix+38| ... | @@ -13,6 +13,17 @@ | ... | @@ -13,6 +13,17 @@ |
| 13 | inputs.nixpkgs.follows = "nixpkgs"; | 13 | inputs.nixpkgs.follows = "nixpkgs"; |
| 14 | }; | 14 | }; |
| 15 | 15 | ||
| 16 | nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew"; | ||
| 17 | |||
| 18 | homebrew-core = { | ||
| 19 | url = "github:homebrew/homebrew-core"; | ||
| 20 | flake = false; | ||
| 21 | }; | ||
| 22 | homebrew-cask = { | ||
| 23 | url = "github:homebrew/homebrew-cask"; | ||
| 24 | flake = false; | ||
| 25 | }; | ||
| 26 | |||
| 16 | hosts = { | 27 | hosts = { |
| 17 | url = "github:StevenBlack/hosts"; | 28 | url = "github:StevenBlack/hosts"; |
| 18 | #flake = false; | 29 | #flake = false; |
| ... | @@ -61,6 +72,9 @@ | ... | @@ -61,6 +72,9 @@ |
| 61 | ghostty, | 72 | ghostty, |
| 62 | nixos-cosmic, | 73 | nixos-cosmic, |
| 63 | nh_darwin, | 74 | nh_darwin, |
| 75 | nix-homebrew, | ||
| 76 | homebrew-core, | ||
| 77 | homebrew-cask, | ||
| 64 | ... | 78 | ... |
| 65 | } @ inputs: let | 79 | } @ inputs: let |
| 66 | overlays = [ | 80 | overlays = [ |
| ... | @@ -100,6 +114,30 @@ | ... | @@ -100,6 +114,30 @@ |
| 100 | "Natalies-MacBook-Air" = darwin.lib.darwinSystem { | 114 | "Natalies-MacBook-Air" = darwin.lib.darwinSystem { |
| 101 | system = "aarch64-darwin"; | 115 | system = "aarch64-darwin"; |
| 102 | modules = [ | 116 | modules = [ |
| 117 | nix-homebrew.darwinModules.nix-homebrew | ||
| 118 | { | ||
| 119 | nix-homebrew = { | ||
| 120 | # Install Homebrew under the default prefix | ||
| 121 | enable = true; | ||
| 122 | |||
| 123 | # Apple Silicon Only: Also install Homebrew under the default Intel prefix for Rosetta 2 | ||
| 124 | enableRosetta = true; | ||
| 125 | |||
| 126 | # User owning the Homebrew prefix | ||
| 127 | user = "yourname"; | ||
| 128 | |||
| 129 | # Optional: Declarative tap management | ||
| 130 | taps = { | ||
| 131 | "homebrew/homebrew-core" = homebrew-core; | ||
| 132 | "homebrew/homebrew-cask" = homebrew-cask; | ||
| 133 | }; | ||
| 134 | |||
| 135 | # Optional: Enable fully-declarative tap management | ||
| 136 | # | ||
| 137 | # With mutableTaps disabled, taps can no longer be added imperatively with `brew tap`. | ||
| 138 | mutableTaps = false; | ||
| 139 | }; | ||
| 140 | } | ||
| 103 | # nh_darwin.nixDarwinModules.default | 141 | # nh_darwin.nixDarwinModules.default |
| 104 | {nixpkgs.overlays = overlays;} | 142 | {nixpkgs.overlays = overlays;} |
| 105 | ./hosts/laptop/configuration.nix | 143 | ./hosts/laptop/configuration.nix |