2017-01-07 19:16:26 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
2024-12-27 18:39:49 +01:00
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.programs.lesspipe;
|
|
|
|
|
|
|
|
in {
|
2017-09-26 23:40:31 +02:00
|
|
|
meta.maintainers = [ maintainers.rycee ];
|
|
|
|
|
2017-01-07 19:16:26 +01:00
|
|
|
options = {
|
|
|
|
programs.lesspipe = {
|
|
|
|
enable = mkEnableOption "lesspipe preprocessor for less";
|
2024-12-27 18:39:49 +01:00
|
|
|
|
|
|
|
package = mkPackageOption pkgs "lesspipe" { };
|
2017-01-07 19:16:26 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-12-27 18:39:49 +01:00
|
|
|
config = mkIf cfg.enable {
|
2017-01-07 19:16:26 +01:00
|
|
|
home.sessionVariables = {
|
2024-12-27 18:39:49 +01:00
|
|
|
LESSOPEN = "|${cfg.package}/bin/lesspipe.sh %s";
|
2017-01-07 19:16:26 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|