about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/programs/bash/ls-colors.nix
blob: 6a5253a3cca2e4c9ce506feea7c044acc8f8a9aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ config, lib, pkgs, ... }:

with lib;

let
  enable = config.programs.bash.enableLsColors;
in
{
  options = {
    programs.bash.enableLsColors = mkEnableOption (lib.mdDoc "extra colors in directory listings") // {
      default = true;
    };
  };

  config = mkIf enable {
    programs.bash.promptPluginInit = ''
      eval "$(${pkgs.coreutils}/bin/dircolors -b)"
    '';
  };
}