Trying starship
This commit is contained in:
@@ -1,17 +1,38 @@
|
|||||||
{ config, pkgs, lib, user, ... }:
|
{ 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} = {
|
home-manager.users.${user.username} = {
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true; # Enables Starship and adds init to shell configs
|
||||||
# Starship settings (e.g., theme, modules)
|
|
||||||
settings = {
|
settings = {
|
||||||
addNewline = false;
|
# Example: Catppuccin Mocha theme
|
||||||
# Other settings...
|
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)\""
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user