mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
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>
31 lines
543 B
Nix
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}''}
|
|
'';
|
|
}
|