+44
nixos/doc/manual/development/option-def.section.md
+44
nixos/doc/manual/development/option-def.section.md
···+The module system internally transforms module syntax into definitions. This always happens internally.+It is possible to create first class definitions which are not transformed _again_ into definitions by the module system.+However, when manipulating definitions, it may be useful for them to be completely self-contained (or "free-floating").+Preserving the file location creates better error messages, for example when copying definitions from one option to another.+Other properties like `mkOverride` `mkMerge` `mkAfter` can be used in the `value` attribute but not the other way around.+The following shows an example configuration that yields an error with the custom position information:+To set the file location for all definitions in a module, you may add the `_file` module syntax attribute, which has a similar effect to using `mkDefinition` on all definitions in the module, without the hassle.
+3
nixos/doc/manual/redirects.json
+3
nixos/doc/manual/redirects.json
···