mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 20:55:31 +03:00
bash: Make it possible to set alternative LS_COLORS
This commit is contained in:
parent
bc54b597c5
commit
682a80bf1f
1 changed files with 7 additions and 1 deletions
|
@ -13,11 +13,17 @@ in
|
||||||
programs.bash.enableLsColors = lib.mkEnableOption "extra colors in directory listings" // {
|
programs.bash.enableLsColors = lib.mkEnableOption "extra colors in directory listings" // {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
|
programs.bash.lsColorsFile = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
default = "";
|
||||||
|
example = lib.literalExpression "\${pkgs.dircolors-solarized}/ansi-dark";
|
||||||
|
description = "Alternative colorscheme for ls colors";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf enable {
|
config = lib.mkIf enable {
|
||||||
programs.bash.promptPluginInit = ''
|
programs.bash.promptPluginInit = ''
|
||||||
eval "$(${pkgs.coreutils}/bin/dircolors -b)"
|
eval "$(${pkgs.coreutils}/bin/dircolors -b ${config.programs.bash.lsColorsFile})"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue