nix-config/modules/home/pager/default.nix

23 lines
502 B
Nix
Raw Permalink 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
{
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
config = lib.mkIf cfg.enable {
home.sessionVariables = {
# My default pager
PAGER = "less";
# Clear the screen on start and exit
LESS = "-R -+X -c";
# Better XDG compliance
LESSHISTFILE = "${config.xdg.stateHome}/less/history";
LESSKEY = "${config.xdg.configHome}/less/lesskey";
};
2021-02-20 14:46:58 +01:00
};
2021-02-20 14:12:57 +01:00
}