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 = {
|
2023-07-02 01:45:18 +02:00
|
|
|
enable = mkEnableOption "less, opposite of more";
|
2021-11-11 11:32:48 +01:00
|
|
|
|
|
|
|
keys = mkOption {
|
|
|
|
type = types.lines;
|
|
|
|
default = "";
|
|
|
|
example = ''
|
|
|
|
s back-line
|
|
|
|
t forw-line
|
|
|
|
'';
|
2023-07-02 01:45:18 +02:00
|
|
|
description = ''
|
2023-07-01 01:30:13 +02:00
|
|
|
Extra configuration for {command}`less` written to
|
|
|
|
{file}`$XDG_CONFIG_HOME/lesskey`.
|
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
|
|
|
};
|
|
|
|
}
|