nix-config/modules/home/pager/default.nix
Bruno BELANYI 42877f591f
All checks were successful
ci/woodpecker/push/check Pipeline was successful
home: xdg: move 'less' variables to their module
2024-03-11 18:10:13 +00:00

22 lines
501 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
LESSKEY = "${config.xdg.configHome}/less/lesskey";
LESSHISTFILE = "${config.xdg.dataHome}/less/history";
};
};
}