diff options
Diffstat (limited to 'lib/modules.nix')
-rw-r--r-- | lib/modules.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/modules.nix b/lib/modules.nix index a7c397d2cf4..862488310d8 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -114,7 +114,7 @@ rec { /* Massage a module into canonical form, that is, a set consisting of ‘options’, ‘config’ and ‘imports’ attributes. */ unifyModuleSyntax = file: key: m: - let metaSet = if m ? meta + let metaSet = if m ? meta then { meta = m.meta; } else {}; in @@ -595,7 +595,7 @@ rec { functionality This show a warning if any a.b.c or d.e.f is set, and set the value of - x.y.z to the result of the merge function + x.y.z to the result of the merge function */ mkMergedOptionModule = from: to: mergeFn: { config, options, ... }: @@ -611,12 +611,12 @@ rec { let val = getAttrFromPath f config; opt = getAttrFromPath f options; in - optionalString + optionalString (val != "_mkMergedOptionModule") "The option `${showOption f}' defined in ${showFiles opt.files} has been changed to `${showOption to}' that has a different type. Please read `${showOption to}' documentation and update your configuration accordingly." ) from); } // setAttrByPath to (mkMerge - (optional + (optional (any (f: (getAttrFromPath f config) != "_mkMergedOptionModule") from) (mergeFn config))); }; |