Skip to content

Commit

Permalink
homebrew: Add bash, fish, and nushell integration options
Browse files Browse the repository at this point in the history
Fish, bash, and nushell are untested as of this commit
  • Loading branch information
AVGVSTVS96 committed Nov 14, 2024
1 parent dcea5f1 commit fbce60b
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions modules/darwin/homebrew.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ in
enableZshIntegration = lib.mkEnableOption "homebrew zsh integration" // {
default = false;
};
enableBashIntegration = lib.mkEnableOption "homebrew bash integration" // {
default = false;
};
enableFishIntegration = lib.mkEnableOption "homebrew fish integration" // {
default = false;
};
enableNushellIntegration = lib.mkEnableOption "homebrew nushell integration" // {
default = false;
};
};
};

Expand All @@ -36,6 +45,19 @@ in
programs.zsh.initExtra = lib.mkIf cfg.enableZshIntegration ''
eval "$(${config.homebrew.brewPrefix}/brew shellenv)"
'';
programs.bash.initExtra = lib.mkIf cfg.enableBashIntegration ''
eval "$(${config.homebrew.brewPrefix}/brew shellenv)"
'';
programs.fish.interactiveShellInit = lib.mkIf cfg.enableFishIntegration ''
eval "$(${config.homebrew.brewPrefix}/brew shellenv)"
'';
# https://www.nushell.sh/book/configuration.html#homebrew
# https://reimbar.org/dev/nushell/
programs.nushell.extraEnv = lib.mkIf cfg.enableFishIntegration ''
# $env.PATH = ($env.PATH | split row (char esep) | prepend '/opt/homebrew/bin')
use std "path add"
path add /opt/homebrew/bin
'';
};

# nix-darwin homebrew module
Expand Down

0 comments on commit fbce60b

Please sign in to comment.