From d053a697bb914854425f6f20d80c0e7976e54e8f Mon Sep 17 00:00:00 2001 From: voidarc Date: Sat, 24 Oct 2026 15:48:34 +0100 Subject: [PATCH] added syntaxhighlighting option --- modules/features/zsh/default.nix | 30 +++++++++++++++++++++--------- modules/hosts/newHost/newHost.nix | 3 +++ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/modules/features/zsh/default.nix b/modules/features/zsh/default.nix index 78fd357..9dba3f7 100644 --- a/modules/features/zsh/default.nix +++ b/modules/features/zsh/default.nix @@ -7,15 +7,27 @@ pkgs, self', ... - }: { - nixpkgs.overlays = [ - (final: prev: { - zsh = self'.packages.zsh; - }) - ]; - - programs.zsh = { - enable = true; + }: {config, ...}: let + lib = pkgs.lib; + in { + imports = []; + options = { + enableHighlighting = lib.mkOption { + type = lib.types.bool; + default = false; + description = "Enable syntax highlighting"; + }; + }; + config = { + nixpkgs.overlays = [ + (final: prev: { + zsh = self'.packages.zsh; + }) + ]; + programs.zsh = { + enable = true; + enableSyntaxHighlighting = config.enableHighlighting; + }; }; }); perSystem = { diff --git a/modules/hosts/newHost/newHost.nix b/modules/hosts/newHost/newHost.nix index cd0fd01..d6083ca 100644 --- a/modules/hosts/newHost/newHost.nix +++ b/modules/hosts/newHost/newHost.nix @@ -11,6 +11,9 @@ newHostConfiguration system zsh + ({...}: { + enableHighlighting = true; + }) ]; }; }