nixos/zsh: add enableLsColors

Borrowed from nixos/bash/ls-colors module
This commit is contained in:
Acid Bong 2023-08-12 20:22:58 +03:00
parent aefe566f73
commit c76bb0d58e
No known key found for this signature in database
GPG Key ID: 675BD8AE40378CCF

View File

@ -159,6 +159,14 @@ in
type = types.bool;
};
enableLsColors = mkOption {
default = true;
description = lib.mdDoc ''
Enable extra colors in directory listings (used by `ls` and `tree`).
'';
type = types.bool;
};
};
};
@ -263,6 +271,11 @@ in
${cfg.interactiveShellInit}
${optionalString cfg.enableLsColors ''
# Extra colors for directory listings.
eval "$(${pkgs.coreutils}/bin/dircolors -b)"
''}
# Setup aliases.
${zshAliases}