From 7f68974ea4e86f8827e6bcc3d26ad356a1e4f505 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Tue, 4 Jan 2022 18:00:50 +0100 Subject: [PATCH] Set brewPrefix defaults according to platform This allows homebrew support to work out of the box on Apple Silicon machines. See #322 --- modules/homebrew.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/homebrew.nix b/modules/homebrew.nix index 4d6b2eca..c087cf98 100644 --- a/modules/homebrew.nix +++ b/modules/homebrew.nix @@ -54,7 +54,7 @@ in brewPrefix = mkOption { type = types.str; - default = "/usr/local/bin"; + default = if pkgs.stdenv.hostPlatform.darwinArch == "aarch64" then "/opt/homebrew/bin" else "/usr/local/bin"; description = '' Customize path prefix where executable of brew is searched for. '';