From 58aa667e28ca4a6a2159b1f3258ef5d494d5ecb6 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 19 Sep 2021 23:59:45 +0200 Subject: [PATCH] starship: initialize using command in profile Fixes #2316 --- modules/programs/starship.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/programs/starship.nix b/modules/programs/starship.nix index 33db8e6d6..d29daa1c6 100644 --- a/modules/programs/starship.nix +++ b/modules/programs/starship.nix @@ -8,6 +8,8 @@ let tomlFormat = pkgs.formats.toml { }; + starshipCmd = "${config.home.profileDirectory}/bin/starship"; + in { meta.maintainers = [ maintainers.marsam ]; @@ -90,19 +92,19 @@ in { programs.bash.initExtra = mkIf cfg.enableBashIntegration '' if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then - eval "$(${cfg.package}/bin/starship init bash)" + eval "$(${starshipCmd} init bash)" fi ''; programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' if [[ $TERM != "dumb" && (-z $INSIDE_EMACS || $INSIDE_EMACS == "vterm") ]]; then - eval "$(${cfg.package}/bin/starship init zsh)" + eval "$(${starshipCmd} init zsh)" fi ''; programs.fish.promptInit = mkIf cfg.enableFishIntegration '' if test "$TERM" != "dumb" -a \( -z "$INSIDE_EMACS" -o "$INSIDE_EMACS" = "vterm" \) - eval (${cfg.package}/bin/starship init fish) + eval (${starshipCmd} init fish) end ''; };