home: pager: use upstream module

Only for the configuration, not `LESS`, as settings it through the
configuration file does not result in the behaviour I want in Git (and
probably other programs).
This commit is contained in:
Bruno BELANYI 2026-01-02 15:13:04 +00:00
parent c3603a6191
commit 7a7da21a27

View file

@ -9,6 +9,16 @@ in
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
programs.less = {
enable = true;
config = ''
#command
# Quit without clearing the screen on `Q`
Q toggle-option -!^Predraw-on-quit\nq
'';
};
home.sessionVariables = { home.sessionVariables = {
# My default pager # My default pager
PAGER = "less"; PAGER = "less";
@ -17,11 +27,5 @@ in
# Better XDG compliance # Better XDG compliance
LESSHISTFILE = "${config.xdg.stateHome}/less/history"; LESSHISTFILE = "${config.xdg.stateHome}/less/history";
}; };
xdg.configFile."lesskey".text = ''
#command
# Quit without clearing the screen on `Q`
Q toggle-option -!^Predraw-on-quit\nq
'';
}; };
} }