From d8fdbbdf03617de1015d1c10fe3bd6ecc5cdce77 Mon Sep 17 00:00:00 2001 From: Justin Lovinger Date: Wed, 27 May 2020 16:18:47 -0400 Subject: [PATCH] dircolors: fix usage together with `zsh.oh-my-zsh` PR #1280 (cherry picked from commit 3a80ece9fa0de388ad27503059f7856c9315d491) --- modules/programs/dircolors.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/programs/dircolors.nix b/modules/programs/dircolors.nix index 5cd913a6..026de72d 100644 --- a/modules/programs/dircolors.nix +++ b/modules/programs/dircolors.nix @@ -215,7 +215,8 @@ in { eval (${pkgs.coreutils}/bin/dircolors -c ~/.dir_colors) ''; - programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' + # Set `LS_COLORS` before Oh My Zsh and `initExtra`. + programs.zsh.initExtraBeforeCompInit = mkIf cfg.enableZshIntegration '' eval $(${pkgs.coreutils}/bin/dircolors -b ~/.dir_colors) ''; };