Introduce more options to configure individual modules
This commit is contained in:
parent
351584ecb4
commit
e3619d6c94
13 changed files with 668 additions and 531 deletions
|
|
@ -12,8 +12,38 @@
|
|||
type = lib.types.bool;
|
||||
description = "Enables yazi";
|
||||
};
|
||||
useDefaultConfig = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Use default yazi config (if disabled only additionalConfig is used)";
|
||||
};
|
||||
additionalConfig = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "Additional config for yazi";
|
||||
};
|
||||
useDefaultKeymap = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Use default yazi keymap (if disabled only additionalKeymap is used)";
|
||||
};
|
||||
additionalKeymap = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "Additional keymap for yazi";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.yazi.enable (
|
||||
lib.optionalAttrs (options ? home.packages) { programs.yazi = import ./yazi.nix; }
|
||||
// {
|
||||
programs.yazi.settings = {
|
||||
settings = config.mods.yazi.additionalKeymap;
|
||||
keymap = config.mods.yazi.additionalConfig;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue