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
|
|
|
{
|
2023-03-16 17:39:13 +01:00
|
|
|
options.my.home.pager = with lib; {
|
|
|
|
enable = my.mkDisableOption "pager configuration";
|
2021-03-13 01:02:19 +01:00
|
|
|
};
|
|
|
|
|
2021-02-20 14:46:58 +01:00
|
|
|
|
2021-05-09 21:13:24 +02:00
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
home.sessionVariables = {
|
|
|
|
# My default pager
|
|
|
|
PAGER = "less";
|
|
|
|
# Clear the screen on start and exit
|
|
|
|
LESS = "-R -+X -c";
|
2023-03-27 10:22:55 +02:00
|
|
|
# Better XDG compliance
|
2024-08-29 12:10:26 +02:00
|
|
|
LESSHISTFILE = "${config.xdg.stateHome}/less/history";
|
2024-03-11 19:10:13 +01:00
|
|
|
LESSKEY = "${config.xdg.configHome}/less/lesskey";
|
2021-05-09 21:13:24 +02:00
|
|
|
};
|
2021-02-20 14:46:58 +01:00
|
|
|
};
|
2021-02-20 14:12:57 +01:00
|
|
|
}
|