home-manager/modules/programs/less.nix
Pamplemousse f23073f1da
less: allow customization
Signed-off-by: Pamplemousse <xav.maso@gmail.com>
2021-11-30 23:28:32 +01:00

33 lines
675 B
Nix

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