treewide: add missing package option
Provide more customization to the binary to be installed.
This commit is contained in:
parent
fcdd04e0f9
commit
107352dde4
27 changed files with 111 additions and 48 deletions
|
|
@ -7,6 +7,8 @@ in {
|
|||
programs.less = {
|
||||
enable = lib.mkEnableOption "less, opposite of more";
|
||||
|
||||
package = lib.mkPackageOption pkgs "less" { nullable = true; };
|
||||
|
||||
keys = lib.mkOption {
|
||||
type = lib.types.lines;
|
||||
default = "";
|
||||
|
|
@ -23,7 +25,8 @@ in {
|
|||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [ pkgs.less ];
|
||||
home.packages = lib.mkIf (cfg.package != null) [ cfg.package ];
|
||||
|
||||
xdg.configFile."lesskey".text = cfg.keys;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue