1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00
home-manager/modules/programs/less.nix

33 lines
668 B
Nix
Raw Permalink Normal View History

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