Skip to content

Commit

Permalink
Add /usr/local/bin in $PATH of macOS for binary installed apps (#841)
Browse files Browse the repository at this point in the history
* Add /usr/local/bin in $PATH of macOS for binary installed apps

* Update zed-editor integration in darwin
  • Loading branch information
kachick authored Oct 11, 2024
1 parent 555136f commit 6613a8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 7 additions & 1 deletion home-manager/darwin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ lib.mkMerge [
# * Do not specify Nix store path for zed in macOS
# https://github.com/NixOS/nixpkgs/blob/bba8dffd3135f35810e9112c40ee621f4ede7cca/pkgs/by-name/ze/zed-editor/package.nix#L217-L219
# * `cli: install` action installs into this path in macOS
VISUAL = "/usr/local/bin/zed --wait";
VISUAL = "zed --wait";
};

sessionPath = [
# Many apps installs the binary here if not used nixpkgs
# For example: zed-editor, cloudflare-warp, vscode(symlink?)
"/usr/local/bin"
];
};

# https://github.com/NixOS/nixpkgs/issues/240819#issuecomment-1616760598
Expand Down
5 changes: 0 additions & 5 deletions home-manager/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,6 @@
if [[ "$OSTYPE" == darwin* ]]; then
# TODO: May move to sessionVariables
export BROWSER='open'
# Microsoft recommends this will be written in ~/.zprofile,
if [ -x '/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code' ]; then
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
fi
fi
'';
};
Expand Down

0 comments on commit 6613a8b

Please sign in to comment.