lib.modules: Default shorthandOnlyDefinesConfig to true when null
This commit is contained in:
parent
6b077c47ff
commit
28aeae2126
1 changed files with 5 additions and 1 deletions
|
@ -562,9 +562,13 @@ rec {
|
|||
let
|
||||
inherit (lib.modules) evalModules;
|
||||
|
||||
shorthandToModule = if shorthandOnlyDefinesConfig == false
|
||||
then value: value
|
||||
else value: { config = value; };
|
||||
|
||||
coerce = unify: value: if isFunction value
|
||||
then setFunctionArgs (args: unify (value args)) (functionArgs value)
|
||||
else unify (if shorthandOnlyDefinesConfig then { config = value; } else value);
|
||||
else unify (shorthandToModule value);
|
||||
|
||||
allModules = defs: imap1 (n: { value, file }:
|
||||
if isAttrs value || isFunction value then
|
||||
|
|
Loading…
Reference in a new issue