From 350fa1f775aa79e0b9934a6c6e916e5ef76d00c9 Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Sat, 1 Nov 2014 23:29:38 +0100 Subject: nixos: Try to show an helpful message when the user sets config. or options. Feel free to improve or remove :-) --- lib/modules.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/modules.nix b/lib/modules.nix index 8af08522051f..fdee8824493d 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; -- cgit 1.4.1