home: pager: make it enable-able

This commit is contained in:
Bruno BELANYI 2021-03-13 00:02:19 +00:00
parent 37038369ff
commit d4bb1e6cd6

View file

@ -1,8 +1,15 @@
{ ... }:
{ config, lib, ... }:
let
cfg = config.my.home.pager;
in
{
programs.lesspipe.enable = true;
options.my.home.pager = with lib.my; {
enable = mkDisableOption "pager configuration";
};
home.sessionVariables = {
config.programs.lesspipe.enable = cfg.enable;
config.home.sessionVariables = lib.mkIf cfg.enable {
# My default pager
PAGER = "less";
# Clear the screen on start and exit