From e9a513dec3ea34512c8d60db8a5af3aea3f1c7d7 Mon Sep 17 00:00:00 2001 From: Simon Walker Date: Wed, 11 Sep 2024 15:57:53 +0100 Subject: [PATCH] Ensure homebrew is on the system path --- home/fish/config.fish | 2 +- system/darwin/common/configuration.nix | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/home/fish/config.fish b/home/fish/config.fish index 261a8e7f..ca859cd7 100644 --- a/home/fish/config.fish +++ b/home/fish/config.fish @@ -83,7 +83,7 @@ switch (uname) # set -x DYLD_LIBRARY_PATH {$BUILD_PREFIX}/lib {$DYLD_LIBRARY_PATH} # # fix nix path - set -x PATH /etc/profiles/per-user/(whoami)/bin "/Applications/PyCharm CE.app/Contents/MacOS" {$PATH} /opt/homebrew/bin + set -x PATH /etc/profiles/per-user/(whoami)/bin "/Applications/PyCharm CE.app/Contents/MacOS" {$PATH} case '*' end diff --git a/system/darwin/common/configuration.nix b/system/darwin/common/configuration.nix index 30c3f1a9..35fff8a7 100644 --- a/system/darwin/common/configuration.nix +++ b/system/darwin/common/configuration.nix @@ -1,6 +1,7 @@ { pkgs, hostname, + config, ... }: { imports = [ @@ -48,7 +49,12 @@ # https://nixcademy.com/2024/01/15/nix-on-macos/ security.pam.enableSudoTouchIdAuth = true; - programs.fish.enable = true; + programs.fish = { + enable = true; + loginShellInit = '' + eval (${config.homebrew.brewPrefix}/brew shellenv) + ''; + }; programs.zsh.enable = true; programs.gnupg.agent.enable = true;