working on starship
This commit is contained in:
+400
-395
File diff suppressed because it is too large
Load Diff
+66
-61
@@ -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,74 +1339,74 @@ 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"
|
||||||
local mocha_base="#1E1E2E"
|
"zsh-autosuggestions"
|
||||||
local mocha_surface0="#313244"
|
"zsh-syntax-highlighting"
|
||||||
local mocha_text="#CDD6F4"
|
"zsh-completions"
|
||||||
local mocha_lavender="#B4BEFE"
|
"zsh-history-substring-search"
|
||||||
local mocha_blue="#89B4FA"
|
];
|
||||||
local mocha_sapphire="#74C7EC"
|
theme = "agnoster"; # Fallback, overridden below
|
||||||
local mocha_teal="#94E2D5"
|
|
||||||
local mocha_green="#A6E3A1"
|
|
||||||
local mocha_yellow="#F9E2AF"
|
|
||||||
local mocha_peach="#FAB387"
|
|
||||||
local mocha_maroon="#EBA0AC"
|
|
||||||
local mocha_red="#F38BA8"
|
|
||||||
local mocha_mauve="#CBA6F7"
|
|
||||||
local mocha_pink="#F5C2E7"
|
|
||||||
local mocha_flamingo="#F2CDCD"
|
|
||||||
local mocha_rosewater="#F5E0DC"
|
|
||||||
|
|
||||||
# Prompt
|
|
||||||
PROMPT='%{$fg[$mocha_blue]%}%n%{$reset_color%}@%{$fg[$mocha_peach]%}%m%{$reset_color%} %{$fg[$mocha_lavender]%}%~%{$reset_color%} %{$fg[$mocha_red]%}$%{$reset_color%} '
|
|
||||||
RPROMPT='%{$fg[$mocha_green]%}%T%{$reset_color%}'
|
|
||||||
|
|
||||||
# Git prompt
|
|
||||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[$mocha_yellow]%}(%{$reset_color%}"
|
|
||||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[$mocha_yellow]%})%{$reset_color%}"
|
|
||||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[$mocha_red]%}✗%{$reset_color%}"
|
|
||||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[$mocha_green]%}✓%{$reset_color%}"
|
|
||||||
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[$mocha_blue]%}⇡%{$reset_color%}"
|
|
||||||
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[$mocha_blue]%}⇣%{$reset_color%}"
|
|
||||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[$mocha_pink]%}?%{$reset_color%}"
|
|
||||||
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[$mocha_sapphire]%}+%{$reset_color%}"
|
|
||||||
ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[$mocha_red]%}!%{$reset_color%}"
|
|
||||||
|
|
||||||
# Virtualenv/pyenv
|
|
||||||
ZSH_THEME_VIRTUAL_ENV_PREFIX="(%{$fg[$mocha_teal]%}"
|
|
||||||
ZSH_THEME_VIRTUAL_ENV_SUFFIX="%{$reset_color%})"
|
|
||||||
|
|
||||||
# Right prompt with Git status
|
|
||||||
RPROMPT='$(git_prompt_info) %{$fg[$mocha_green]%}%T%{$reset_color%}'
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Declare all plugins via Nixpkgs for reproducibility
|
# Source Nixpkgs-provided plugins explicitly
|
||||||
plugins = with pkgs.zshPlugins; [
|
initContent = ''
|
||||||
zsh-autosuggestions
|
# Source plugins installed by Nix
|
||||||
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-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
|
||||||
source ${pkgs.zsh-history-substring-search}/share/zsh-history-substring-search/zsh-history-substring-search.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_surface0="#313244"
|
||||||
|
local mocha_text="#CDD6F4"
|
||||||
|
local mocha_lavender="#B4BEFE"
|
||||||
|
local mocha_blue="#89B4FA"
|
||||||
|
local mocha_sapphire="#74C7EC"
|
||||||
|
local mocha_teal="#94E2D5"
|
||||||
|
local mocha_green="#A6E3A1"
|
||||||
|
local mocha_yellow="#F9E2AF"
|
||||||
|
local mocha_peach="#FAB387"
|
||||||
|
local mocha_maroon="#EBA0AC"
|
||||||
|
local mocha_red="#F38BA8"
|
||||||
|
local mocha_mauve="#CBA6F7"
|
||||||
|
local mocha_pink="#F5C2E7"
|
||||||
|
local mocha_flamingo="#F2CDCD"
|
||||||
|
local mocha_rosewater="#F5E0DC"
|
||||||
|
|
||||||
|
# Prompt
|
||||||
|
PROMPT='%{$fg[$mocha_blue]%}%n%{$reset_color%}@%{$fg[$mocha_peach]%}%m%{$reset_color%} %{$fg[$mocha_lavender]%}%~%{$reset_color%} %{$fg[$mocha_red]%}$%{$reset_color%} '
|
||||||
|
RPROMPT='%{$fg[$mocha_green]%}%T%{$reset_color%}'
|
||||||
|
|
||||||
|
# Git prompt
|
||||||
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[$mocha_yellow]%}(%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[$mocha_yellow]%})%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[$mocha_red]%}✗%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[$mocha_green]%}✓%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg[$mocha_blue]%}⇡%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_BEHIND="%{$fg[$mocha_blue]%}⇣%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[$mocha_pink]%}?%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[$mocha_sapphire]%}+%{$reset_color%}"
|
||||||
|
ZSH_THEME_GIT_PROMPT_UNSTAGED="%{$fg[$mocha_red]%}!%{$reset_color%}"
|
||||||
|
|
||||||
|
# Virtualenv/pyenv
|
||||||
|
ZSH_THEME_VIRTUAL_ENV_PREFIX="(%{$fg[$mocha_teal]%}"
|
||||||
|
ZSH_THEME_VIRTUAL_ENV_SUFFIX="%{$reset_color%})"
|
||||||
|
|
||||||
|
# Right prompt with Git status
|
||||||
|
RPROMPT='$(git_prompt_info) %{$fg[$mocha_green]%}%T%{$reset_color%}'
|
||||||
|
|
||||||
|
# Set the custom theme
|
||||||
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
|
||||||
|
|||||||
Reference in New Issue
Block a user