From 86e9626af0087c3540f9f1d99324618817bae161 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Thu, 30 Nov 2023 21:04:52 +0100 Subject: zsh: disable function subdirs makes zsh really slow to boot --- common/commandline/zsh.nix | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/common/commandline/zsh.nix b/common/commandline/zsh.nix index 1110bf2..f11cb37 100644 --- a/common/commandline/zsh.nix +++ b/common/commandline/zsh.nix @@ -1,12 +1,28 @@ -inputs: - -{ config, lib, pkgs, ... }: - -with inputs.self.lib.theme; -let +inputs: { + config, + lib, + pkgs, + ... +}: +with inputs.self.lib.theme; let dominantEscapeCode = fgEscapeCode config.theme.colors.dominant; -in -{ +in { + nixpkgs.overlays = [ + (final: prev: { + zsh = prev.zsh.overrideAttrs (old: { + configureFlags = [ + "--enable-maildir-support" + "--enable-multibyte" + "--with-tcsetpgrp" + "--enable-pcre" + "--enable-zshenv=/1rz4g4znpzjwh1xymhjpm42vipw92pr73vdgl6xs1hycac8kf2n9/etc/zshenv" + "--disable-site-fndir" + # "--enable-function-subdirs" + ]; + }); + }) + ]; + programs.zsh = { enable = true; @@ -40,7 +56,7 @@ in syntaxHighlighting = { enable = true; - highlighters = [ "main" "brackets" "line" ]; + highlighters = ["main" "brackets" "line"]; }; shellAliases = { @@ -69,7 +85,7 @@ in # XDG dotDir = ".config/zsh"; - history.path = "${config.xdg.dataHome}/zsh/zsh_history"; + history.path = "${config.xdg.dataHome}/zsh/zsh_history"; plugins = [ { -- cgit v1.2.3