···
config = mkIf cfg.enable {
programs.bash.${initOption} = ''
if [[ $TERM != "dumb" ]]; then
47
-
export STARSHIP_CONFIG=${settingsFile}
47
+
# don't set STARSHIP_CONFIG automatically if there's a user-specified
48
+
# config file. starship appears to use a hardcoded config location
49
+
# rather than one inside an XDG folder:
50
+
# https://github.com/starship/starship/blob/686bda1706e5b409129e6694639477a0f8a3f01b/src/configure.rs#L651
51
+
if [[ ! -f "$HOME/.config/starship.toml" ]]; then
52
+
export STARSHIP_CONFIG=${settingsFile}
eval "$(${pkgs.starship}/bin/starship init bash)"
programs.fish.${initOption} = ''
if test "$TERM" != "dumb"
54
-
set -x STARSHIP_CONFIG ${settingsFile}
60
+
# don't set STARSHIP_CONFIG automatically if there's a user-specified
61
+
# config file. starship appears to use a hardcoded config location
62
+
# rather than one inside an XDG folder:
63
+
# https://github.com/starship/starship/blob/686bda1706e5b409129e6694639477a0f8a3f01b/src/configure.rs#L651
64
+
if not test -f "$HOME/.config/starship.toml";
65
+
set -x STARSHIP_CONFIG ${settingsFile}
eval (${pkgs.starship}/bin/starship init fish)
programs.zsh.${initOption} = ''
if [[ $TERM != "dumb" ]]; then
61
-
export STARSHIP_CONFIG=${settingsFile}
73
+
# don't set STARSHIP_CONFIG automatically if there's a user-specified
74
+
# config file. starship appears to use a hardcoded config location
75
+
# rather than one inside an XDG folder:
76
+
# https://github.com/starship/starship/blob/686bda1706e5b409129e6694639477a0f8a3f01b/src/configure.rs#L651
77
+
if [[ ! -f "$HOME/.config/starship.toml" ]]; then
78
+
export STARSHIP_CONFIG=${settingsFile}
eval "$(${pkgs.starship}/bin/starship init zsh)"