nix-config/modules/home/pager/default.nix
Bruno BELANYI fbd3b70d61
All checks were successful
ci/woodpecker/push/check Pipeline was successful
home: use 'XDG_STATE_HOME' for history files
It's specified as the place to put them, so let's make use of it I
guess.
2024-09-06 20:52:30 +01: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";
};
};
}