From 7a7da21a27cb438e4b68f2d51e7ba86babfb25d0 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Fri, 2 Jan 2026 15:13:04 +0000 Subject: [PATCH] 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). --- modules/home/pager/default.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/home/pager/default.nix b/modules/home/pager/default.nix index c14ff7e..073cf16 100644 --- a/modules/home/pager/default.nix +++ b/modules/home/pager/default.nix @@ -9,6 +9,16 @@ in 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 = { # My default pager PAGER = "less"; @@ -17,11 +27,5 @@ in # Better XDG compliance 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 - ''; }; }