diff --git a/src/nix/flake.cc b/src/nix/flake.cc
index fb7ea6211..2bf3de1b3 100644
--- a/src/nix/flake.cc
+++ b/src/nix/flake.cc
@@ -773,6 +773,7 @@ struct CmdFlakeCheck : FlakeCommand
                             || name == "homeConfigurations"
                             || name == "homeModule"
                             || name == "homeModules"
+                            || name == "modules"
                             || name == "nixopsConfigurations"
                             )
                             // Known but unchecked community attribute