Working on reshuffling

This commit is contained in:
2026-03-19 07:18:58 +00:00
parent cb7b026b36
commit 385bc35226
2 changed files with 30 additions and 6 deletions
+15 -3
View File
@@ -1313,15 +1313,20 @@ let
username = "henrov";
in
{
# Define a toggle option for enabling Zsh
options.mySystem.terminals.zsh.enable =
lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh";
# Use `config` only inside a `config = { ... }` block of the module
config = lib.mkIf (lib.getOption config.mySystem.terminals.zsh.enable) {
# Module config block
config = lib.mkIf (config.mySystem.terminals.zsh.enable or false) {
# Home Manager scope for the user
home-manager.users.${username} = {
programs.zsh.enable = true;
programs.zsh.enableCompletion = true;
# Oh-My-Zsh configuration
programs.zsh.ohMyZsh = {
enable = true;
theme = "catppuccin-mocha";
@@ -1332,10 +1337,11 @@ in
"zsh-autosuggestions"
"zsh-completions"
"zsh-history-substring-search"
"zsh-syntax-highlighting"
# zsh-syntax-highlighting will be sourced in initExtra
];
};
# Extra init content
programs.zsh.initExtra = ''
# Catppuccin Mocha colors
local mocha_base="#1E1E2E"
@@ -1355,8 +1361,14 @@ in
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 properly
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
'';
};
};
+15 -3
View File
@@ -4,15 +4,20 @@ let
username = "henrov";
in
{
# Define a toggle option for enabling Zsh
options.mySystem.terminals.zsh.enable =
lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh";
# Use `config` only inside a `config = { ... }` block of the module
config = lib.mkIf (lib.getOption config.mySystem.terminals.zsh.enable) {
# Module config block
config = lib.mkIf (config.mySystem.terminals.zsh.enable or false) {
# Home Manager scope for the user
home-manager.users.${username} = {
programs.zsh.enable = true;
programs.zsh.enableCompletion = true;
# Oh-My-Zsh configuration
programs.zsh.ohMyZsh = {
enable = true;
theme = "catppuccin-mocha";
@@ -23,10 +28,11 @@ in
"zsh-autosuggestions"
"zsh-completions"
"zsh-history-substring-search"
"zsh-syntax-highlighting"
# zsh-syntax-highlighting will be sourced in initExtra
];
};
# Extra init content
programs.zsh.initExtra = ''
# Catppuccin Mocha colors
local mocha_base="#1E1E2E"
@@ -46,8 +52,14 @@ in
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 properly
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
'';
};
};