aboutsummaryrefslogtreecommitdiffstats
path: root/modules/terminal/less/default.nix
blob: f68875c6bf3828c36d86181f7791053b9320517d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# less - terminal pager
{ config, lib, ... }:
{
  options.terminal.less = {
    enable = lib.mkEnableOption "Enables less.";
    package = lib.mkOption {
      type = lib.types.package;
      readOnly = true;
      default = config.programs.less.package;
      description = "The less package to use.";
    };
  };

  config = lib.mkIf config.terminal.less.enable {
    programs.less = {
      enable = true;
      options = [
        "--RAW-CONTROL-CHARS"
        "--quit-if-one-screen"
        "--no-init"
        "--ignore-case"
      ];
    };
  };
}