Working on termonal stuff

This commit is contained in:
2026-03-07 23:18:59 +01:00
parent 9ca8142ce8
commit e5ba7f8a95
@@ -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} = {
programs.starship = {
enable = true; # Enables Starship and adds init to shell configs
# Simple settings (flat Nix attributes)
settings = {
add_newline = false;
programs.zsh = {
enable = true;
enableCompletion = true;
oh-my-zsh = {
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
xdg.configFile."starship.toml".text = ''
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) "
'';
# 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)\""
# Set Zsh options (e.g., AUTO_CD) in .zshrc
xdg.configFile."zsh/.zshrc".text = lib.concatStringsSep "\n" [
"setopt AUTO_CD"
"setopt CORRECT"
"setopt INTERACTIVE_COMMENTS"
];
};
}