diff --git a/modules/homebrew.nix b/modules/homebrew.nix index a47d677..ab33b10 100644 --- a/modules/homebrew.nix +++ b/modules/homebrew.nix @@ -557,23 +557,22 @@ in imports = [ (mkRenamedOptionModule [ "homebrew" "autoUpdate" ] [ "homebrew" "onActivation" "autoUpdate" ]) (mkRenamedOptionModule [ "homebrew" "cleanup" ] [ "homebrew" "onActivation" "cleanup" ]) + (mkRemovedOptionModule [ "homebrew" "whalebrews" ] "Whalebrew support was removed from Homebrew Bundle in Homebrew 4.7.0 (Nov 2025). `whalebrew` entries in a Brewfile now cause `brew bundle` to fail. Please manage Whalebrew images directly using the `whalebrew` CLI.") ]; options.homebrew = { enable = mkEnableOption '' {command}`nix-darwin` to manage installing/updating/upgrading Homebrew taps, formulae, - casks, Mac App Store apps, Go packages, Cargo crates, and Docker containers, using Homebrew - Bundle. + casks, Mac App Store apps, Go packages, and Cargo crates using Homebrew Bundle. Note that enabling this option does not install Homebrew, see the Homebrew [website](https://brew.sh) for installation instructions. Use the [](#opt-homebrew.brews), [](#opt-homebrew.casks), [](#opt-homebrew.masApps), [](#opt-homebrew.goPackages), - [](#opt-homebrew.cargoPackages), [](#opt-homebrew.whalebrews), and - [](#opt-homebrew.vscode) options to list the Homebrew formulae, casks, Mac App - Store apps, Go packages, Cargo crates, Docker containers, and Visual Studio Code - extensions you'd like to install. Use the + [](#opt-homebrew.cargoPackages), and [](#opt-homebrew.vscode) options to list the + Homebrew formulae, casks, Mac App Store apps, Go packages, Cargo crates, and + Visual Studio Code extensions you'd like to install. Use the [](#opt-homebrew.taps) option, to make additional formula repositories available to Homebrew. This module uses those options (along with the [](#opt-homebrew.caskArgs) options) to generate a Brewfile that @@ -803,21 +802,6 @@ in ''; }; - whalebrews = mkOption { - type = with types; listOf str; - default = [ ]; - example = [ "whalebrew/wget" ]; - description = '' - List of Docker images to install using {command}`whalebrew`. - - When this option is used, `"whalebrew"` is automatically added to - [](#opt-homebrew.brews). - - For more information on {command}`whalebrew` see: - [github.com/whalebrew/whalebrew](https://github.com/whalebrew/whalebrew). - ''; - }; - vscode = mkOption { type = with types; listOf str; default = [ ]; @@ -834,6 +818,7 @@ in ''; }; + extraConfig = mkOption { type = types.lines; default = ""; @@ -868,9 +853,6 @@ in "homebrew.enable" ]; - homebrew.brews = - optional (cfg.whalebrews != [ ]) "whalebrew"; - homebrew.brewfile = "# Created by `nix-darwin`'s `homebrew` module\n\n" + mkBrewfileSectionString "Taps" cfg.taps @@ -882,7 +864,6 @@ in (mapAttrsToList (n: id: ''mas "${n}", id: ${toString id}'') cfg.masApps) + mkBrewfileSectionString "Go packages" (map (v: ''go "${v}"'') cfg.goPackages) + mkBrewfileSectionString "Cargo packages" (map (v: ''cargo "${v}"'') cfg.cargoPackages) - + mkBrewfileSectionString "Docker containers" (map (v: ''whalebrew "${v}"'') cfg.whalebrews) + mkBrewfileSectionString "Visual Studio Code extensions" (map (v: ''vscode "${v}"'') cfg.vscode) + optionalString (cfg.extraConfig != "") ("# Extra config\n" + cfg.extraConfig); diff --git a/tests/homebrew.nix b/tests/homebrew.nix index b87a176..ed9a5fd 100644 --- a/tests/homebrew.nix +++ b/tests/homebrew.nix @@ -85,14 +85,11 @@ in "ripgrep" ]; - homebrew.whalebrews = [ - "whalebrew/wget" - ]; - homebrew.vscode = [ "golang.go" ]; + test = '' bf=${lib.escapeShellArg config.homebrew.brewfile} @@ -126,9 +123,6 @@ in echo "checking cargo entries in Brewfile" >&2 ${mkTest "ripgrep" ''cargo "ripgrep"''} - echo "checking whalebrew entries in Brewfile" >&2 - ${mkTest "whalebrew/wget" ''whalebrew "whalebrew/wget"''} - echo "checking vscode entries in Brewfile" >&2 ${mkTest "golang.go" ''vscode "golang.go"''} '';