nix-config/modules/home/pager/default.nix
Bruno BELANYI f3e04a1db2
Some checks failed
ci/woodpecker/push/check Pipeline failed
WIP: use 'XDG_STATE_HOME' for history files
2024-08-29 10:10:26 +00:00

23 lines
502 B
Nix

{ config, lib, ... }:
let
cfg = config.my.home.pager;
in
{
options.my.home.pager = with lib; {
enable = my.mkDisableOption "pager configuration";
};
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";
};
};
}