nixos/zsh: add enableLsColors

Borrowed from nixos/bash/ls-colors module

Changed files
+13
nixos
modules
programs
zsh
+13
nixos/modules/programs/zsh/zsh.nix
···
type = types.bool;
};
+
enableLsColors = mkOption {
+
default = true;
+
description = lib.mdDoc ''
+
Enable extra colors in directory listings (used by `ls` and `tree`).
+
'';
+
type = types.bool;
+
};
+
};
};
···
${cfge.interactiveShellInit}
${cfg.interactiveShellInit}
+
+
${optionalString cfg.enableLsColors ''
+
# Extra colors for directory listings.
+
eval "$(${pkgs.coreutils}/bin/dircolors -b)"
+
''}
# Setup aliases.
${zshAliases}