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