working on zsh
This commit is contained in:
@@ -1,4 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
# --- NixOS Configuration ---
|
# --- NixOS Configuration ---
|
||||||
@@ -14,13 +19,30 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
|
|
||||||
# Use oh-my-zsh only for themes (optional)
|
# Enable oh-my-zsh
|
||||||
oh-my-zsh = {
|
oh-my-zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = "agnoster"; # Fallback
|
theme = "agnoster"; # Fallback, overridden below
|
||||||
customThemes = {
|
};
|
||||||
catppuccin-mocha = ''
|
|
||||||
# Catppuccin Mocha colors
|
# Declare all plugins via Nixpkgs for reproducibility
|
||||||
|
plugins = with pkgs.zshPlugins; [
|
||||||
|
zsh-autosuggestions
|
||||||
|
zsh-syntax-highlighting
|
||||||
|
zsh-completions
|
||||||
|
zsh-history-substring-search
|
||||||
|
zsh-you-should-use
|
||||||
|
];
|
||||||
|
|
||||||
|
# Source plugins and set custom theme
|
||||||
|
initExtra = ''
|
||||||
|
# Source plugins
|
||||||
|
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
|
||||||
|
# Colors
|
||||||
local mocha_base="#1E1E2E"
|
local mocha_base="#1E1E2E"
|
||||||
local mocha_surface0="#313244"
|
local mocha_surface0="#313244"
|
||||||
local mocha_text="#CDD6F4"
|
local mocha_text="#CDD6F4"
|
||||||
@@ -59,24 +81,8 @@
|
|||||||
|
|
||||||
# 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"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user