Skip to content

Commit 891724a

Browse files
committed
net.nix: Add TODO to consider for improving error messages
1 parent b3c793c commit 891724a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nix/net.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ in
147147
warnings = [ "Please use nodes.${name} option instead of assigning machines to the config's top level" ];
148148
})
149149
nodes);
150+
151+
# Provides compatibility for old style node definitions outside in the root,
152+
# outside the `nodes` option.
153+
# TODO: interpreting arbitrary _mistaken_ configs as machines leads to
154+
# obscure errors, so we should consider removing this backcompat
155+
# solution, or perhaps eagerly throw an appropriate error as soon as
156+
# we encounter an unknown key. The warning may not be encountered.
150157
_module.freeformType = types.attrsOf deferredModule;
151158
};
152159
}

0 commit comments

Comments
 (0)