From a97fed5d868089bf0949221586701846ddea79a2 Mon Sep 17 00:00:00 2001 From: Bo Jeanes Date: Fri, 19 Jul 2024 09:27:38 +1000 Subject: [PATCH] Add brew back to path while I slowly migrate things --- flake.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 3fe20b7..5acf842 100644 --- a/flake.nix +++ b/flake.nix @@ -339,11 +339,24 @@ linux = { }; # home-manager config specific to Darwin - darwin = { + darwin = let + addBrewPath = '' + # Apple Silicon + [ -d /opt/homebrew/bin ] && export PATH="/opt/homebrew/bin:$PATH" + [ -d /opt/homebrew/sbin ] && export PATH="/opt/homebrew/sbin:$PATH" + + # Intel + [ -d /usr/local/bin ] && export PATH="/usr/local/bin:$PATH" + [ -d /usr/local/sbin ] && export PATH="/usr/local/sbin:$PATH" + ''; + in { # Yank/paste in Neovim to/from macOS clipboard by default programs.nixvim.clipboard.register = "unnamedplus"; programs.git.extraConfig."gpg \"ssh\"".program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"; + + programs.bash.initExtra = addBrewPath; + programs.zsh.initExtra = addBrewPath; }; }; };