fix: enable imports for secondary modules in yazi keymap
Some checks failed
ci / nix-fmt (push) Failing after 14m43s
Some checks failed
ci / nix-fmt (push) Failing after 14m43s
This commit is contained in:
parent
4c5d4cd017
commit
5a0f2631ee
3 changed files with 21 additions and 7 deletions
|
|
@ -4,12 +4,17 @@
|
|||
namespace,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
} @ args: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
inherit (lib.${namespace}) getAttrByNamespace mkOptionsWithNamespace enabled;
|
||||
base = "${namespace}.cli.media.yazi";
|
||||
cfg = getAttrByNamespace config base;
|
||||
in {
|
||||
imports = [
|
||||
(import ./keymap.nix args)
|
||||
(import ./openers.nix args)
|
||||
];
|
||||
|
||||
options = mkOptionsWithNamespace base {
|
||||
enable = mkEnableOption "yazi";
|
||||
};
|
||||
|
|
@ -28,7 +33,7 @@ in {
|
|||
settings = {
|
||||
log = enabled;
|
||||
|
||||
manager = {
|
||||
mgr = {
|
||||
ratio = [1 3 3];
|
||||
sort_by = "natural";
|
||||
sort_reverse = false;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = config.yazi;
|
||||
inherit (lib.${namespace}) getAttrByNamespace;
|
||||
base = "${namespace}.cli.media.yazi";
|
||||
cfg = getAttrByNamespace config base;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.yazi.keymap = {
|
||||
programs.yazi.settings.keymap = {
|
||||
mgr.keymap = [
|
||||
{
|
||||
on = ["<Esc>"];
|
||||
|
|
|
|||
|
|
@ -1,10 +1,16 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.yazi.enable {
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.${namespace}) getAttrByNamespace;
|
||||
base = "${namespace}.cli.media.yazi";
|
||||
cfg = getAttrByNamespace config base;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.yazi.settings = {
|
||||
open.rules = [
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue