From 2ba8de9d849f9fa8c61e03f04573a37bd8415a5c Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Sat, 7 Mar 2026 23:14:43 +0100 Subject: [PATCH] Trying starship --- .../applications/terminal_shell/starship.nix | 37 +++++++++++++++---- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/Droidnix/generated/system/applications/terminal_shell/starship.nix b/Droidnix/generated/system/applications/terminal_shell/starship.nix index c589c9ed7..f1a297bd5 100644 --- a/Droidnix/generated/system/applications/terminal_shell/starship.nix +++ b/Droidnix/generated/system/applications/terminal_shell/starship.nix @@ -1,17 +1,38 @@ { config, pkgs, lib, user, ... }: { + # NixOS: Install Starship system-wide (optional) + environment.systemPackages = with pkgs; [ starship ]; + + # Home Manager: Configure Starship for the user home-manager.users.${user.username} = { programs.starship = { - enable = true; - # Starship settings (e.g., theme, modules) + enable = true; # Enables Starship and adds init to shell configs settings = { - addNewline = false; - # Other settings... + # Example: Catppuccin Mocha theme + add_newline = false; + format = "$all"; + [character] + success_symbol = "[❯](bold green)" + error_symbol = "[❯](bold red)" + vicmd_symbol = "[❮](bold blue)" + [directory] + truncation_length = 3 + style = "bold blue" + [git_branch] + symbol = " " + style = "bold purple" + format = "[$symbol$branch]($style) " }; - # Enable Starship for specific shells - bash.enable = true; - zsh.enable = true; - fish.enable = true; }; + + # Optional: Manually ensure Starship init is in shell configs + xdg.configFile."bashrc".text = lib.concatStringsSep "\n" [ + "${config.programs.starship.extraInit}" + "eval \"$(starship init bash)\"" + ]; + xdg.configFile."zshrc".text = lib.concatStringsSep "\n" [ + "${config.programs.starship.extraInit}" + "eval \"$(starship init zsh)\"" + ]; }; }