Skip to content

Commit

Permalink
net.nix: Add TODO to consider for improving error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
roberth committed Mar 1, 2023
1 parent b3c793c commit 891724a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nix/net.nix
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ in
warnings = [ "Please use nodes.${name} option instead of assigning machines to the config's top level" ];
})
nodes);

# Provides compatibility for old style node definitions outside in the root,
# outside the `nodes` option.
# TODO: interpreting arbitrary _mistaken_ configs as machines leads to
# obscure errors, so we should consider removing this backcompat
# solution, or perhaps eagerly throw an appropriate error as soon as
# we encounter an unknown key. The warning may not be encountered.
_module.freeformType = types.attrsOf deferredModule;
};
}

0 comments on commit 891724a

Please sign in to comment.