feat(home-manager): add starship prompt and reorganize CLI features

- Move zsh configuration from global/ to features/cli/
- Add starship.nix with custom prompt configuration
  - Left prompt: username@hostname, directory, git status, vi-mode indicator
  - Right prompt: language/environment indicators (C, direnv, Haskell, Bun, Python, Rust)
  - Git status with semantic colors (green=staged, yellow=modified/untracked, red=conflicted/deleted, cyan=stashed/renamed)
  - Vi-mode aware prompt character (red heart in insert, blue in normal)
- Update features/cli to import starship via zsh.nix
- Remove empty imports section from global/default.nix
This commit is contained in:
♥ Minnie ♥ 2025-10-25 23:13:22 +08:00
parent 65f6a14f69
commit bdf7c14c6c
Signed by: jasmine
GPG key ID: 8563E358D4E8040E
4 changed files with 75 additions and 5 deletions

View file

@ -2,10 +2,6 @@
# This module provides base user settings, nixpkgs configuration, and core imports
# that are inherited across all hosts where this user is configured.
{outputs, lib, ...}: {
imports = [
./zsh.nix # Shell configuration and plugins
];
# Nixpkgs configuration - applies overlays and sets package acceptance policy
nixpkgs = {
# Apply custom overlays to extend/modify the package set

View file

@ -1,53 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
fzf # command-line fuzzy finder
];
programs.zsh = {
enable = true;
# Enable extra features
autosuggestion = {
enable = true;
};
syntaxHighlighting = {
enable = true;
};
enableCompletion = true;
# Configuration directory
dotDir = ".config/zsh";
shellAliases = {
# Single letter aliases
c = "clear";
v = "nvim";
# Double letter aliases
la = "ls -a";
ll = "ls -l";
};
# Install plugins
plugins = [
{ # vi(vim) mode for ZSH
name = "zsh-vi-mode";
src = "${pkgs.zsh-vi-mode}/share/zsh-vi-mode";
}
{ # replace zsh's completion with fzf
name = "fzf-tab";
src = "${pkgs.zsh-fzf-tab}/share/fzf-tab";
}
];
# Extra commands that should be added to '.zshrc'
initContent = ''
eval "$(direnv hook zsh)"
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
export PATH
PROMPT='%F{blue}%n@%m %F{cyan}%~ %F{red} %f';
'';
};
}