From 4a4743329bdc0010dbec295818f0fa8d6410e990 Mon Sep 17 00:00:00 2001 From: oddlama Date: Mon, 3 Jun 2024 22:45:11 +0200 Subject: [PATCH] fix: slow zsh startup because of double compinit --- config/home-manager.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/config/home-manager.nix b/config/home-manager.nix index 10806c9..53e6818 100644 --- a/config/home-manager.nix +++ b/config/home-manager.nix @@ -24,6 +24,13 @@ # Required even when using home-manager's zsh module since the /etc/profile load order # is partly controlled by this. See nix-community/home-manager#3681. - # TODO remove once we have nushell - programs.zsh.enable = true; + # FIXME: remove once we have nushell + programs.zsh = { + enable = true; + # Disable the completion in the global module because it would call compinit + # but the home manager config also calls compinit. This causes the cache to be invalidated + # because the fpath changes in-between, causing constant re-evaluation and thus startup + # times of 1-2 seconds. Disable the completion here and only keep the home-manager one to fix it. + enableCompletion = false; + }; }