From 07499a1eaf7ebd96c528cbc7558111d0ca632bfc Mon Sep 17 00:00:00 2001 From: Dustin Frisch Date: Thu, 23 Jun 2022 12:05:31 +0200 Subject: [PATCH] eval.nix: per-node specialArgs --- src/nix/hive/eval.nix | 2 +- src/nix/hive/options.nix | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/nix/hive/eval.nix b/src/nix/hive/eval.nix index b094bd8..50028e5 100644 --- a/src/nix/hive/eval.nix +++ b/src/nix/hive/eval.nix @@ -146,7 +146,7 @@ let colmenaOptions.deploymentOptions hive.defaults ] ++ configs; - specialArgs = hive.meta.specialArgs // { + specialArgs = hive.meta.specialArgs // (hive.meta.nodeSpecialArgs.${name} or {}) // { inherit name; nodes = uncheckedNodes; }; diff --git a/src/nix/hive/options.nix b/src/nix/hive/options.nix index e19c4c0..3e3770f 100644 --- a/src/nix/hive/options.nix +++ b/src/nix/hive/options.nix @@ -248,6 +248,13 @@ with builtins; rec { type = types.attrsOf types.unspecified; default = {}; }; + nodeSpecialArgs = lib.mkOption { + description = '' + Node-specific special args. + ''; + type = types.attrsOf types.unspecified; + default = {}; + }; machinesFile = lib.mkOption { description = '' Use the machines listed in this file when building this hive configuration.