From 82907d13b62c5f8a2fad30d08770234a986d590a Mon Sep 17 00:00:00 2001 From: "info@data-pro.nu" Date: Thu, 19 Mar 2026 07:20:36 +0000 Subject: [PATCH] Working on reshuffling --- Droidnix/README.org | 14 ++++++-------- Droidnix/generated/modules/terminals/zsh.nix | 12 +++++------- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/Droidnix/README.org b/Droidnix/README.org index a0150ccf5..1464556ae 100644 --- a/Droidnix/README.org +++ b/Droidnix/README.org @@ -1305,7 +1305,7 @@ in #+END_SRC ** =generated/modules/terminals/zsh.nix= -This sets up the zsh in the terminal +This sets up the zsh in the terminal #+BEGIN_SRC nix :tangle generated/modules/terminals/zsh.nix :noweb tangle :mkdirp yes :eval never-html { lib, pkgs, ... }: @@ -1313,20 +1313,19 @@ let username = "henrov"; in { - # Define a toggle option for enabling Zsh + # Declare a module option to enable Zsh options.mySystem.terminals.zsh.enable = lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh"; - # Module config block - config = lib.mkIf (config.mySystem.terminals.zsh.enable or false) { + # Only evaluate Home Manager config if enabled + config = lib.mkIf (lib.getOption "mySystem.terminals.zsh.enable" or false) { - # Home Manager scope for the user + # Home Manager scope home-manager.users.${username} = { programs.zsh.enable = true; programs.zsh.enableCompletion = true; - # Oh-My-Zsh configuration programs.zsh.ohMyZsh = { enable = true; theme = "catppuccin-mocha"; @@ -1341,7 +1340,6 @@ in ]; }; - # Extra init content programs.zsh.initExtra = '' # Catppuccin Mocha colors local mocha_base="#1E1E2E" @@ -1365,7 +1363,7 @@ in 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 + # 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 diff --git a/Droidnix/generated/modules/terminals/zsh.nix b/Droidnix/generated/modules/terminals/zsh.nix index 42f3a099b..dc31e20b4 100644 --- a/Droidnix/generated/modules/terminals/zsh.nix +++ b/Droidnix/generated/modules/terminals/zsh.nix @@ -4,20 +4,19 @@ let username = "henrov"; in { - # Define a toggle option for enabling Zsh + # Declare a module option to enable Zsh options.mySystem.terminals.zsh.enable = lib.mkEnableOption "Enable Zsh terminal with Oh-My-Zsh"; - # Module config block - config = lib.mkIf (config.mySystem.terminals.zsh.enable or false) { + # Only evaluate Home Manager config if enabled + config = lib.mkIf (lib.getOption "mySystem.terminals.zsh.enable" or false) { - # Home Manager scope for the user + # Home Manager scope home-manager.users.${username} = { programs.zsh.enable = true; programs.zsh.enableCompletion = true; - # Oh-My-Zsh configuration programs.zsh.ohMyZsh = { enable = true; theme = "catppuccin-mocha"; @@ -32,7 +31,6 @@ in ]; }; - # Extra init content programs.zsh.initExtra = '' # Catppuccin Mocha colors local mocha_base="#1E1E2E" @@ -56,7 +54,7 @@ in 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 + # 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