31 lines
661 B
Nix
31 lines
661 B
Nix
{inputs, lib, self, ...}: let
|
|
inherit (lib) getExe;
|
|
mkWhichKey = pkgs: menu:
|
|
(self.wrapperModules.which-key.apply {
|
|
inherit pkgs;
|
|
settings = {
|
|
inherit menu;
|
|
anchor = "bottom-right";
|
|
};
|
|
}).wrapper;
|
|
in {
|
|
flake.mkWhichKeyExe = pkgs: menu: getExe (mkWhichKey pkgs menu);
|
|
flake.wrapperModules.which-key = inputs.wrappers.lib.wrapModule (
|
|
{ config, lib, ... }: let
|
|
yamlFormat = config.pkgs.formats.yaml {};
|
|
in {
|
|
options = {
|
|
settings = lib.mkOption {
|
|
type = yamlFormat.type;
|
|
};
|
|
};
|
|
config = {
|
|
package = config.pkgs.wlr-which-key;
|
|
args = [
|
|
(toString (yamlFormat.generate "config.yaml" config.settings))
|
|
];
|
|
};
|
|
});
|
|
}
|
|
|