summary refs log tree commit diff
path: root/nixos/modules/programs/bash/ls-colors.nix
blob: 254ee14c477d681ae7eae2ac7df63834841c61e1 (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 "extra colors in directory listings" // {
      default = true;
    };
  };

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