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 <c0d5b8c54d/modules/homebrew.nix (L561)>
This commit is contained in:
reo101 2024-06-01 14:44:07 +03:00
parent 9d7318eb21
commit be2ad3ccfd
Signed by: reo101
GPG key ID: 675AA7EF13964ACB

View file

@ -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
'';