Trying starship

This commit is contained in:
2026-03-07 23:14:43 +01:00
parent 44a485c9b8
commit 2ba8de9d84
@@ -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)\""
];
};
}