mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 09:29:41 +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
592 B
Nix
31 lines
592 B
Nix
{ lib, ... }:
|
|
|
|
{
|
|
programs.less = {
|
|
enable = true;
|
|
options = lib.mkMerge [
|
|
{
|
|
quiet = true;
|
|
use-color = true;
|
|
}
|
|
(lib.mkAfter {
|
|
color = [
|
|
"HkK" # header: gray
|
|
"Mkb" # marks: blue
|
|
];
|
|
})
|
|
(lib.mkOrder 2000 {
|
|
prompt = "s%f";
|
|
})
|
|
];
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/lesskey
|
|
assertFileContent home-files/.config/lesskey ${builtins.toFile "lesskey.expected" ''
|
|
#env
|
|
LESS = --quiet --use-color --color=HkK --color=Mkb --prompt=s%f
|
|
''}
|
|
'';
|
|
}
|