lesspipe: allow configuring package
This commit is contained in:
parent
35b98d20ca
commit
19398e505a
4 changed files with 21 additions and 3 deletions
|
|
@ -2,18 +2,24 @@
|
|||
|
||||
with lib;
|
||||
|
||||
{
|
||||
let
|
||||
|
||||
cfg = config.programs.lesspipe;
|
||||
|
||||
in {
|
||||
meta.maintainers = [ maintainers.rycee ];
|
||||
|
||||
options = {
|
||||
programs.lesspipe = {
|
||||
enable = mkEnableOption "lesspipe preprocessor for less";
|
||||
|
||||
package = mkPackageOption pkgs "lesspipe" { };
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf config.programs.lesspipe.enable {
|
||||
config = mkIf cfg.enable {
|
||||
home.sessionVariables = {
|
||||
LESSOPEN = "|${pkgs.lesspipe}/bin/lesspipe.sh %s";
|
||||
LESSOPEN = "|${cfg.package}/bin/lesspipe.sh %s";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue