depot/third_party/home-manager/modules/programs/less.nix
Default email b9675abb90 Project import generated by Copybara.
GitOrigin-RevId: 781d25b315def05cd7ede3765226c54216f0b1fe
2021-12-02 21:30:34 -08:00

32 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;
};
}