diff options
author | Silvan Mosberger <contact@infinisil.com> | 2020-01-08 17:36:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-08 17:36:43 +0100 |
commit | b46776d14eb9388983296f1c73c4bd04430791bc (patch) | |
tree | a9b5ad3acab38d1ae87c01c0a822803f5723088e | |
parent | f4654713a3ca1820f0ff674ccf091d0cd0fcc8ff (diff) | |
parent | 43ef3a8d003fd64477b2eabb41e617e23e10a05f (diff) |
Clarify error message of 'assigning to top-level attribute' (#76702)
Clarify error message of 'assigning to top-level attribute'
-rw-r--r-- | lib/modules.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/modules.nix b/lib/modules.nix index 48788ae933dd4..aebc9874aa463 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -123,7 +123,7 @@ rec { if m ? config || m ? options then let badAttrs = removeAttrs m ["_file" "key" "disabledModules" "imports" "options" "config" "meta"]; in if badAttrs != {} then - throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by assignments to the top-level attributes `config' or `options'." + throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by introducing a top-level `config' or `options' attribute. Add configuration attributes immediately on the top level instead, or move all of them (namely: ${toString (attrNames badAttrs)}) into the explicit `config' attribute." else { _file = m._file or file; key = toString m.key or key; |