From c34e08489ec87a23cd18dd4f6035c840071995b9 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 2 Aug 2025 11:01:14 +0200 Subject: [PATCH] lib.modules: Adjust error message - Lower case error trace for consistency - Be more explicit about the condition under which the hint applies, and the resolution. --- lib/modules.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/modules.nix b/lib/modules.nix index dc4513da8e0a..ad8a381e97f7 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -258,8 +258,7 @@ let ; _class = class; _prefix = prefix; - config = builtins.addErrorContext "If you get an infinite recursion here, you probably reference `config` - in `imports`. This is not supported; consider using mkEnableOption." config; + config = addErrorContext "if you get an infinite recursion here, you probably reference `config` in `imports`. This is not possible. If you are trying to achieve a conditional behavior dependent on `config`, consider importing unconditionally, and using `mkEnableOption` and `mkIf` to control its effect." config; } // specialArgs );