working on starship

This commit is contained in:
2026-03-11 14:31:16 +01:00
parent 066ed6adae
commit 71cf8dc28a
4 changed files with 470 additions and 460 deletions
+366 -361
View File
File diff suppressed because it is too large Load Diff
+32 -27
View File
@@ -1307,9 +1307,9 @@ This file sets up starship prompt
home-manager.users.${user.username} = { home-manager.users.${user.username} = {
programs.starship = { programs.starship = {
enable = true; enable = true;
settings = { # settings = {
configFile = "${flakeRoot}/assets/system/conf/starship.toml"; # configFile = "${flakeRoot}/assets/system/conf/starship.toml";
}; # };
}; };
}; };
} }
@@ -1318,7 +1318,12 @@ This file sets up starship prompt
** =generated/system/applications/terminal_shell/zsh.nix= ** =generated/system/applications/terminal_shell/zsh.nix=
This sets up the zsh terminal This sets up the zsh terminal
#+BEGIN_SRC nix :tangle generated/system/applications/terminal_shell/zsh.nix :noweb tangle :mkdirp yes :eval never-html #+BEGIN_SRC nix :tangle generated/system/applications/terminal_shell/zsh.nix :noweb tangle :mkdirp yes :eval never-html
{ lib, config, pkgs, ... }: {
lib,
config,
pkgs,
...
}:
{ {
# --- NixOS Configuration --- # --- NixOS Configuration ---
@@ -1334,13 +1339,29 @@ This sets up the zsh terminal
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
# Use oh-my-zsh only for themes (optional) # Enable oh-my-zsh and use its plugins
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
theme = "agnoster"; # Fallback plugins = [
customThemes = { "git"
catppuccin-mocha = '' "docker"
# Catppuccin Mocha colors "direnv"
"zsh-autosuggestions"
"zsh-syntax-highlighting"
"zsh-completions"
"zsh-history-substring-search"
];
theme = "agnoster"; # Fallback, overridden below
};
# Source Nixpkgs-provided plugins explicitly
initContent = ''
# Source plugins installed by Nix
source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ${pkgs.zsh-history-substring-search}/share/zsh-history-substring-search/zsh-history-substring-search.zsh
# Catppuccin Mocha theme for oh-my-zsh
local mocha_base="#1E1E2E" local mocha_base="#1E1E2E"
local mocha_surface0="#313244" local mocha_surface0="#313244"
local mocha_text="#CDD6F4" local mocha_text="#CDD6F4"
@@ -1379,29 +1400,13 @@ This sets up the zsh terminal
# Right prompt with Git status # Right prompt with Git status
RPROMPT='$(git_prompt_info) %{$fg[$mocha_green]%}%T%{$reset_color%}' RPROMPT='$(git_prompt_info) %{$fg[$mocha_green]%}%T%{$reset_color%}'
'';
};
};
# Declare all plugins via Nixpkgs for reproducibility # Set the custom theme
plugins = with pkgs.zshPlugins; [
zsh-autosuggestions
zsh-syntax-highlighting
zsh-completions
zsh-history-substring-search
zsh-you-should-use # Optional: Suggests aliases
];
# Source plugins that need explicit activation
initExtra = ''
source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source ${pkgs.zsh-history-substring-search}/share/zsh-history-substring-search/zsh-history-substring-search.zsh
ZSH_THEME="catppuccin-mocha" ZSH_THEME="catppuccin-mocha"
''; '';
}; };
# Home Manager packages (optional, if not already in systemPackages) # Home Manager packages (optional)
home.packages = with pkgs; [ home.packages = with pkgs; [
direnv direnv
git-extras git-extras
@@ -3,9 +3,9 @@
home-manager.users.${user.username} = { home-manager.users.${user.username} = {
programs.starship = { programs.starship = {
enable = true; enable = true;
settings = { # settings = {
configFile = "${flakeRoot}/assets/system/conf/starship.toml"; # configFile = "${flakeRoot}/assets/system/conf/starship.toml";
}; # };
}; };
}; };
} }
@@ -35,7 +35,7 @@
}; };
# Source Nixpkgs-provided plugins explicitly # Source Nixpkgs-provided plugins explicitly
initExtra = '' initContent = ''
# Source plugins installed by Nix # Source plugins installed by Nix
source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh