Working on reshuffling

This commit is contained in:
2026-03-19 07:22:11 +00:00
parent 82907d13b6
commit 6e7ce5181c
2 changed files with 104 additions and 94 deletions
+52 -47
View File
@@ -1317,57 +1317,62 @@ in
options.mySystem.terminals.zsh.enable = options.mySystem.terminals.zsh.enable =
lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh"; lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh";
# Only evaluate Home Manager config if enabled # Flake-style nixosModule
config = lib.mkIf (lib.getOption "mySystem.terminals.zsh.enable" or false) { flake.nixosModules.zsh = { config, ... }: let
enableZsh = config.mySystem.terminals.zsh.enable or false;
in
{
config = lib.mkIf enableZsh {
# Home Manager scope # Home Manager scope for the user
home-manager.users.${username} = { home-manager.users.${username} = {
programs.zsh.enable = true; programs.zsh.enable = true;
programs.zsh.enableCompletion = true; programs.zsh.enableCompletion = true;
programs.zsh.ohMyZsh = { programs.zsh.ohMyZsh = {
enable = true; enable = true;
theme = "catppuccin-mocha"; theme = "catppuccin-mocha";
plugins = [ plugins = [
"git" "git"
"docker" "docker"
"direnv" "direnv"
"zsh-autosuggestions" "zsh-autosuggestions"
"zsh-completions" "zsh-completions"
"zsh-history-substring-search" "zsh-history-substring-search"
# zsh-syntax-highlighting will be sourced in initExtra # zsh-syntax-highlighting will be sourced in initExtra
]; ];
};
programs.zsh.initExtra = ''
# Catppuccin Mocha colors
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="#94D2D5"
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="#F5E2C7"
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%}'
# Source zsh-syntax-highlighting
if [ -f ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi
'';
}; };
programs.zsh.initExtra = ''
# Catppuccin Mocha colors
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="#94D2D5"
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="#F5E2C7"
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%}'
# Source zsh-syntax-highlighting
if [ -f ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi
'';
}; };
}; };
} }
+52 -47
View File
@@ -8,57 +8,62 @@ in
options.mySystem.terminals.zsh.enable = options.mySystem.terminals.zsh.enable =
lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh"; lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh";
# Only evaluate Home Manager config if enabled # Flake-style nixosModule
config = lib.mkIf (lib.getOption "mySystem.terminals.zsh.enable" or false) { flake.nixosModules.zsh = { config, ... }: let
enableZsh = config.mySystem.terminals.zsh.enable or false;
in
{
config = lib.mkIf enableZsh {
# Home Manager scope # Home Manager scope for the user
home-manager.users.${username} = { home-manager.users.${username} = {
programs.zsh.enable = true; programs.zsh.enable = true;
programs.zsh.enableCompletion = true; programs.zsh.enableCompletion = true;
programs.zsh.ohMyZsh = { programs.zsh.ohMyZsh = {
enable = true; enable = true;
theme = "catppuccin-mocha"; theme = "catppuccin-mocha";
plugins = [ plugins = [
"git" "git"
"docker" "docker"
"direnv" "direnv"
"zsh-autosuggestions" "zsh-autosuggestions"
"zsh-completions" "zsh-completions"
"zsh-history-substring-search" "zsh-history-substring-search"
# zsh-syntax-highlighting will be sourced in initExtra # zsh-syntax-highlighting will be sourced in initExtra
]; ];
};
programs.zsh.initExtra = ''
# Catppuccin Mocha colors
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="#94D2D5"
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="#F5E2C7"
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%}'
# Source zsh-syntax-highlighting
if [ -f ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi
'';
}; };
programs.zsh.initExtra = ''
# Catppuccin Mocha colors
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="#94D2D5"
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="#F5E2C7"
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%}'
# Source zsh-syntax-highlighting
if [ -f ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]; then
source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi
'';
}; };
}; };
} }