From 2dbb25a9e36fd84aa20410205d65d5eb3f32e601 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 7 Apr 2021 20:05:15 +0000 Subject: [PATCH] modules: packages: prefer user compinit to global This should make the shell startup faster. --- modules/packages.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/packages.nix b/modules/packages.nix index 9eb50f6..4560ab1 100644 --- a/modules/packages.nix +++ b/modules/packages.nix @@ -1,5 +1,5 @@ # Common packages -{ pkgs, ... }: +{ config, pkgs, ... }: { # List packages installed in system profile. To search, run: @@ -13,7 +13,11 @@ ]; programs.vim.defaultEditor = true; # Modal editing is life - programs.zsh.enable = true; # Use integrations + programs.zsh = { + enable = true; # Use integrations + # Disable global compinit when a user config exists + enableGlobalCompInit = !config.my.home.zsh.enable; + }; nixpkgs.config.allowUnfree = true; # Because I don't care *that* much. }