nix-config/home/pager.nix

19 lines
379 B
Nix
Raw Normal View History

2021-03-13 01:02:19 +01:00
{ config, lib, ... }:
let
cfg = config.my.home.pager;
in
2021-02-20 14:12:57 +01:00
{
2021-03-13 01:02:19 +01:00
options.my.home.pager = with lib.my; {
enable = mkDisableOption "pager configuration";
};
config.programs.lesspipe.enable = cfg.enable;
2021-02-20 14:46:58 +01:00
2021-03-13 01:02:19 +01:00
config.home.sessionVariables = lib.mkIf cfg.enable {
2021-02-20 14:46:58 +01:00
# My default pager
PAGER = "less";
# Clear the screen on start and exit
LESS = "-R -+X -c";
};
2021-02-20 14:12:57 +01:00
}