From be2ad3ccfd943304a632ab5355fea6c1693f6480 Mon Sep 17 00:00:00 2001 From: reo101 Date: Sat, 1 Jun 2024 14:44:07 +0300 Subject: [PATCH] fix(homebrew)!: do not reinstall on activation `/usr/local/bin/brew` was the path for `x86_64-darwin` `aarch64-darwin` uses `/opt/homebrew/bin/brew` Use `${config.homebrew.brewPrefix}` to support both See --- modules/nix-darwin/brew/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/nix-darwin/brew/default.nix b/modules/nix-darwin/brew/default.nix index 05c4a68..45acd7e 100644 --- a/modules/nix-darwin/brew/default.nix +++ b/modules/nix-darwin/brew/default.nix @@ -20,7 +20,7 @@ in if ! xcode-select --version 2>/dev/null; then $DRY_RUN_CMD xcode-select --install fi - if ! /usr/local/bin/brew --version 2>/dev/null; then + if ! ${config.homebrew.brewPrefix}/brew --version 2>/dev/null; then $DRY_RUN_CMD /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" fi '';