Files
home-manager/tests/modules/programs/less/custom-options-and-config.nix
Austin Horstman a2cc7b0bab less: migrate to lib.cli.toCommandLineGNU
Migrates from the deprecated toCommandLine to toCommandLineGNU.

This changes the output format to use GNU-style options with equals
(--wheel-lines=3). Both formats were verified to work correctly with less.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2026-01-08 14:56:14 -05:00

31 lines
543 B
Nix

let
config = ''
#command
s back-line
t forw-line
'';
in
{
programs.less = {
enable = true;
inherit config;
options = {
RAW-CONTROL-CHARS = true;
quiet = true;
wheel-lines = [
3
1
];
};
};
nmt.script = ''
assertFileExists home-files/.config/lesskey
assertFileContent home-files/.config/lesskey ${builtins.toFile "less.expected" ''
#env
LESS = --RAW-CONTROL-CHARS --quiet --wheel-lines=3 --wheel-lines=1
${config}''}
'';
}