Skip to content

Commit 365d68d

Browse files
committed
hive.inspect: add hostPlatform to inspect
This will be used for the agent to correctly determine what binary to push.
1 parent 6e11939 commit 365d68d

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

runtime/evaluate.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ rec {
7171

7272
inspect = {
7373
inherit path;
74-
nodes = builtins.mapAttrs (_: v: v.config.deployment) nodes;
74+
nodes = builtins.mapAttrs (
75+
_: v:
76+
v.config.deployment
77+
// {
78+
# Necessary for the agent so it can know what architecture it should push to
79+
inherit (v.config.nixpkgs.hostPlatform) system;
80+
}
81+
) nodes;
7582
};
7683
}

wire/lib/src/hive/node.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ pub struct Node {
5757

5858
#[serde(rename(deserialize = "_keys", serialize = "keys"))]
5959
pub keys: im::Vector<Key>,
60+
61+
#[serde()]
62+
// system is the architecture of the host, this is mainly used for
63+
// determining the correct binary to push to the host's machine.
64+
pub system: Option<String>,
6065
}
6166

6267
impl Default for Node {
@@ -67,6 +72,7 @@ impl Default for Node {
6772
tags: im::HashSet::new(),
6873
allow_local_deployment: true,
6974
build_remotely: false,
75+
system: None,
7076
}
7177
}
7278
}

0 commit comments

Comments
 (0)