From f53ebef41c26b3b4cb024685e952a4450b631bd6 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sun, 17 Jan 2021 00:06:45 -0800 Subject: [PATCH] nix/eval.nix: Disallow setting network and meta at the same time --- src/nix/eval.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/nix/eval.nix b/src/nix/eval.nix index ab0b8ec..688c131 100644 --- a/src/nix/eval.nix +++ b/src/nix/eval.nix @@ -79,7 +79,10 @@ let }; }; - userMeta = if rawHive ? meta then rawHive.meta + userMeta = + if rawHive ? meta && rawHive ? network then + throw "Only one of `network` and `meta` may be specified. `meta` should be used as `network` is for NixOps compatibility." + else if rawHive ? meta then rawHive.meta else if rawHive ? network then rawHive.network else {};