{ 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 less written to
$HOME/.lesskey.
'';
};
};
};
config = mkIf cfg.enable {
home.packages = [ pkgs.less ];
home.file.".lesskey".text = cfg.keys;
};
}