Unverified Commit c76bb0d5 authored by Acid Bong's avatar Acid Bong
Browse files

nixos/zsh: add enableLsColors

Borrowed from nixos/bash/ls-colors module
parent aefe566f
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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}