It’s been working great and I have a relatively simple brew configuration
homebrew = {
enable = true;
onActivation.autoUpdate = false;
};
# If an app isn't available in the Mac App Store, or the version in the App Store has
# limitiations, e.g., Transmit, install the Homebrew Cask.
homebrew.casks = [
"cleanmymac"
"pulsar"
"rectangle"
"visual-studio-code"
"vlc"
];
homebrew.brews = [
"mas"
];
homebrew.masApps = {
"Microsoft Remote Desktop" = 1295203466;
"Slack for Desktop" = 803453959;
Xcode = 497799835;
};
At some point, I found that brew is no longer on the $PATH although I do see it installed at /opt/homebrew.
Any ideas why brew is not being put on the $PATH? And more generally, how can I troubleshoot these kinds of issues?
Hmm…but it’s working on my Intel Macs without that. And it seems nix-darwin should be doing it based on
brewPrefix = mkOption {
type = types.str;
default = if pkgs.stdenv.hostPlatform.isAarch64 then "/opt/homebrew/bin" else "/usr/local/bin";
defaultText = literalExpression ''
if pkgs.stdenv.hostPlatform.isAarch64 then "/opt/homebrew/bin"
else "/usr/local/bin"
'';
description = ''
The path prefix where the <command>brew</command> executable is located. This will be set to
the correct value based on your system's platform, and should only need to be changed if you
manually installed Homebrew in a non-standard location.
'';
};
I’m 99% sure this was working at some point for both Intel and M1.