mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 23:16:46 +00:00
lz.n: missing type check
This commit is contained in:
parent
7350769edf
commit
d5bc0ce4f9
1 changed files with 5 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) toJSON;
|
inherit (builtins) toJSON typeOf head length;
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
inherit (lib.attrsets) mapAttrsToList;
|
inherit (lib.attrsets) mapAttrsToList;
|
||||||
inherit (lib.generators) mkLuaInline;
|
inherit (lib.generators) mkLuaInline;
|
||||||
|
@ -40,7 +40,10 @@
|
||||||
${optionalString (spec.after != null) spec.after}
|
${optionalString (spec.after != null) spec.after}
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
keys = map toLuzLznKeySpec spec.keys;
|
keys =
|
||||||
|
if typeOf spec.keys == "list" && length spec.keys > 0 && typeOf (head spec.keys) == "set"
|
||||||
|
then map toLuzLznKeySpec spec.keys
|
||||||
|
else spec.keys;
|
||||||
};
|
};
|
||||||
lznSpecs = mapAttrsToList toLuaLznSpec cfg.plugins;
|
lznSpecs = mapAttrsToList toLuaLznSpec cfg.plugins;
|
||||||
in {
|
in {
|
||||||
|
|
Loading…
Reference in a new issue