diff options
author | Acid Bong <acid-bong@cock.lt> | 2023-08-12 20:22:58 +0300 |
---|---|---|
committer | Acid Bong <acid-bong@cock.lt> | 2023-08-12 20:53:05 +0300 |
commit | c76bb0d58e85f555067547d7ca487dc733549863 (patch) | |
tree | e079f5db9c41c8c6a3f03282f411af791470ee9e /nixos/modules | |
parent | aefe566f73164776003ef5ef78003b5f9ccd7c4f (diff) | |
download | nixlib-c76bb0d58e85f555067547d7ca487dc733549863.tar nixlib-c76bb0d58e85f555067547d7ca487dc733549863.tar.gz nixlib-c76bb0d58e85f555067547d7ca487dc733549863.tar.bz2 nixlib-c76bb0d58e85f555067547d7ca487dc733549863.tar.lz nixlib-c76bb0d58e85f555067547d7ca487dc733549863.tar.xz nixlib-c76bb0d58e85f555067547d7ca487dc733549863.tar.zst nixlib-c76bb0d58e85f555067547d7ca487dc733549863.zip |
nixos/zsh: add enableLsColors
Borrowed from nixos/bash/ls-colors module
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/programs/zsh/zsh.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nixos/modules/programs/zsh/zsh.nix b/nixos/modules/programs/zsh/zsh.nix index 6bb21cb3ef66..cad639f299c8 100644 --- a/nixos/modules/programs/zsh/zsh.nix +++ b/nixos/modules/programs/zsh/zsh.nix @@ -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} |