1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-21 17:59:39 +01:00
home-manager/modules/programs/less.nix
Austin Horstman cba2f9ce95 treewide: reformat nixfmt-rfc-style
Reformat repository using new nixfmt-rfc-style.
2025-04-08 08:50:05 -07:00

39 lines
791 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.less;
in
{
meta.maintainers = [ lib.maintainers.pamplemousse ];
options = {
programs.less = {
enable = lib.mkEnableOption "less, opposite of more";
package = lib.mkPackageOption pkgs "less" { nullable = true; };
keys = lib.mkOption {
type = lib.types.lines;
default = "";
example = ''
s back-line
t forw-line
'';
description = ''
Extra configuration for {command}`less` written to
{file}`$XDG_CONFIG_HOME/lesskey`.
'';
};
};
};
config = lib.mkIf cfg.enable {
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
xdg.configFile."lesskey".text = cfg.keys;
};
}