From bd9f031efc634be4b80c5090b9171cc3a9f8e49c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Reynier?= Date: Wed, 28 Jan 2026 23:06:41 +0100 Subject: [PATCH] starship: move init at the end of `.bashrc` (#8662) Move Starship's Bash init at the end of .bashrc using mkOrder 1900. Starship uses $PROMPT_COMMAND to generate timing information. To do so, it copies the original content of $PROMPT_COMMAND into $STARSHIP_PROMPT_COMMAND. Therefore it should be loaded last to prevent other program to append to $PROMPT_COMMAND. Only Zoxide, which is initialized with mkOrder 2000, should be loaded after, see: ajeetdsouza/zoxide#1136 --- modules/programs/starship.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/programs/starship.nix b/modules/programs/starship.nix index 2d2e3506..559e68f2 100644 --- a/modules/programs/starship.nix +++ b/modules/programs/starship.nix @@ -104,11 +104,13 @@ in }; }; - programs.bash.initExtra = mkIf cfg.enableBashIntegration '' - if [[ $TERM != "dumb" ]]; then - eval "$(${lib.getExe cfg.package} init bash --print-full-init)" - fi - ''; + programs.bash.initExtra = mkIf cfg.enableBashIntegration ( + lib.mkOrder 1900 '' + if [[ $TERM != "dumb" ]]; then + eval "$(${lib.getExe cfg.package} init bash --print-full-init)" + fi + '' + ); programs.zsh.initContent = mkIf cfg.enableZshIntegration '' if [[ $TERM != "dumb" ]]; then