summary refs log tree commit diff
path: root/lib/modules.nix
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2014-11-01 23:29:38 +0100
committerLuca Bruno <lucabru@src.gnome.org>2014-11-01 23:33:24 +0100
commit350fa1f775aa79e0b9934a6c6e916e5ef76d00c9 (patch)
treee3d3a2e66ad6e9addde092d84530eecc7e07b685 /lib/modules.nix
parent0bba805fa6817479bb0cc4a06d99d08ba98b25ce (diff)
downloadnixpkgs-350fa1f775aa79e0b9934a6c6e916e5ef76d00c9.tar
nixpkgs-350fa1f775aa79e0b9934a6c6e916e5ef76d00c9.tar.gz
nixpkgs-350fa1f775aa79e0b9934a6c6e916e5ef76d00c9.tar.bz2
nixpkgs-350fa1f775aa79e0b9934a6c6e916e5ef76d00c9.tar.lz
nixpkgs-350fa1f775aa79e0b9934a6c6e916e5ef76d00c9.tar.xz
nixpkgs-350fa1f775aa79e0b9934a6c6e916e5ef76d00c9.tar.zst
nixpkgs-350fa1f775aa79e0b9934a6c6e916e5ef76d00c9.zip
nixos: Try to show an helpful message when the user sets config. or options.
Feel free to improve or remove :-)
Diffstat (limited to 'lib/modules.nix')
-rw-r--r--lib/modules.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/modules.nix b/lib/modules.nix
index 8af08522051..fdee8824493 100644
--- a/lib/modules.nix
+++ b/lib/modules.nix
@@ -58,7 +58,7 @@ rec {
     if m ? config || m ? options then
       let badAttrs = removeAttrs m ["imports" "options" "config" "key" "_file"]; in
       if badAttrs != {} then
-        throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'."
+        throw "Module `${key}' has an unsupported attribute `${head (attrNames badAttrs)}'. This is caused by assignments to the top-level attributes `config' or `options'."
       else
         { file = m._file or file;
           key = toString m.key or key;