2021-11-11 10:32:48 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let cfg = config.programs.less;
|
|
|
|
in {
|
|
|
|
meta.maintainers = [ maintainers.pamplemousse ];
|
|
|
|
|
|
|
|
options = {
|
|
|
|
programs.less = {
|
2023-07-01 23:45:18 +00:00
|
|
|
enable = mkEnableOption "less, opposite of more";
|
2021-11-11 10:32:48 +00:00
|
|
|
|
|
|
|
keys = mkOption {
|
|
|
|
type = types.lines;
|
|
|
|
default = "";
|
|
|
|
example = ''
|
|
|
|
s back-line
|
|
|
|
t forw-line
|
|
|
|
'';
|
2023-07-01 23:45:18 +00:00
|
|
|
description = ''
|
2023-06-30 23:30:13 +00:00
|
|
|
Extra configuration for {command}`less` written to
|
|
|
|
{file}`$XDG_CONFIG_HOME/lesskey`.
|
2021-11-11 10:32:48 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home.packages = [ pkgs.less ];
|
2021-12-06 20:48:59 +00:00
|
|
|
xdg.configFile."lesskey".text = cfg.keys;
|
2021-11-11 10:32:48 +00:00
|
|
|
};
|
|
|
|
}
|