bash: allow setting lsColorsFile to null

Signed-off-by: misilelab <misileminecord@gmail.com>

authored by misilelab and committed by Masum Reza cbd562ee 298adfbc

+5 -3
+5 -3
nixos/modules/programs/bash/ls-colors.nix
··· 14 default = true; 15 }; 16 programs.bash.lsColorsFile = lib.mkOption { 17 - type = lib.types.path; 18 - default = ""; 19 example = lib.literalExpression "\${pkgs.dircolors-solarized}/ansi-dark"; 20 description = "Alternative colorscheme for ls colors"; 21 }; ··· 23 24 config = lib.mkIf enable { 25 programs.bash.promptPluginInit = '' 26 - eval "$(${pkgs.coreutils}/bin/dircolors -b ${config.programs.bash.lsColorsFile})" 27 ''; 28 }; 29 }
··· 14 default = true; 15 }; 16 programs.bash.lsColorsFile = lib.mkOption { 17 + type = lib.types.nullOr lib.types.path; 18 + default = null; 19 example = lib.literalExpression "\${pkgs.dircolors-solarized}/ansi-dark"; 20 description = "Alternative colorscheme for ls colors"; 21 }; ··· 23 24 config = lib.mkIf enable { 25 programs.bash.promptPluginInit = '' 26 + eval "$(${pkgs.coreutils}/bin/dircolors -b ${ 27 + lib.optionalString (config.programs.bash.lsColorsFile != null) config.programs.bash.lsColorsFile 28 + })" 29 ''; 30 }; 31 }