2021-12-03 05:30:34 +00: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 = ''
|
2023-08-08 10:19:01 +00:00
|
|
|
Extra configuration for {command}`less` written to
|
|
|
|
{file}`$XDG_CONFIG_HOME/lesskey`.
|
2021-12-03 05:30:34 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
home.packages = [ pkgs.less ];
|
2023-01-10 09:35:00 +00:00
|
|
|
xdg.configFile."lesskey".text = cfg.keys;
|
2021-12-03 05:30:34 +00:00
|
|
|
};
|
|
|
|
}
|