nixos/less: introduce programs.less.package

Allow users to set the package, e.g. to override withSecure to true.
This commit is contained in:
Tom Fitzhenry
2024-05-28 08:34:45 +10:00
committed by tomf
parent 39cb4bd48b
commit 25193bdc60
+3 -1
View File
@@ -35,6 +35,8 @@ in
# therefore also enables this module
enable = lib.mkEnableOption "less, a file pager";
package = lib.mkPackageOption pkgs "less" { };
configFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
default = null;
@@ -110,7 +112,7 @@ in
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.less ];
environment.systemPackages = [ cfg.package ];
environment.variables = {
LESSKEYIN_SYSTEM = builtins.toString lessKey;