Working on termonal stuff
This commit is contained in:
@@ -6,46 +6,33 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
# 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.zsh = {
|
||||||
enable = true; # Enables Starship and adds init to shell configs
|
enable = true;
|
||||||
# Simple settings (flat Nix attributes)
|
enableCompletion = true;
|
||||||
settings = {
|
oh-my-zsh = {
|
||||||
add_newline = false;
|
enable = true;
|
||||||
|
theme = "";
|
||||||
|
plugins = [
|
||||||
|
"git"
|
||||||
|
"sudo"
|
||||||
|
"extract"
|
||||||
|
"colored-man-pages"
|
||||||
|
"command-not-found"
|
||||||
|
"history"
|
||||||
|
"docker"
|
||||||
|
"kubectl"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
autosuggestions.enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Provide a full starship.toml via xdg.configFile
|
# Set Zsh options (e.g., AUTO_CD) in .zshrc
|
||||||
xdg.configFile."starship.toml".text = ''
|
xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [
|
||||||
format = "$all"
|
"setopt AUTO_CD"
|
||||||
|
"setopt CORRECT"
|
||||||
[character]
|
"setopt INTERACTIVE_COMMENTS"
|
||||||
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) "
|
|
||||||
'';
|
|
||||||
|
|
||||||
# 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