build every agent from the agent-base template
Delete nix/templates/ruth.nix, the ruth nixosConfiguration, module and toplevel, the hive-c0re managerToplevel option, and the meta flake's isManager switch with lifecycle::MANAGER_NAME. Every agent, ruth included, now builds from nix/templates/agent.nix. The template's only content beyond agent.nix was docs.enable = mkDefault true; docs.enable is off by default for every agent and ruth's own agent.nix turns it on. Refs #5377
This commit is contained in:
parent
1f214f9f01
commit
1b60084bf0
15 changed files with 85 additions and 95 deletions
|
|
@ -31,9 +31,6 @@ pub use hive_host_sock::{AGENT_PREFIX, container_name};
|
|||
/// 11 chars (it gets encoded into network interface names) and `AGENT_PREFIX`
|
||||
/// (`h-`) takes 2, so the agent name itself is at most `MAX_AGENT_NAME` chars.
|
||||
pub const MAX_AGENT_NAME: usize = 9;
|
||||
/// Logical name of the manager agent (broker recipient, state-dir key,
|
||||
/// meta flake attribute). All persistent state lives under `ruth/`.
|
||||
pub const MANAGER_NAME: &str = "ruth";
|
||||
/// Mount point of the per-agent runtime directory inside the container.
|
||||
pub const CONTAINER_RUNTIME_MOUNT: &str = "/run/hive";
|
||||
|
||||
|
|
@ -327,7 +324,6 @@ async fn agents_for_meta(name_to_add: Option<&str>) -> Result<Vec<crate::meta::A
|
|||
.filter_map(|c| {
|
||||
let name = c.strip_prefix(AGENT_PREFIX)?.to_owned();
|
||||
Some(crate::meta::AgentSpec {
|
||||
is_manager: name == MANAGER_NAME,
|
||||
port: agent_web_port(&name),
|
||||
name,
|
||||
})
|
||||
|
|
@ -337,7 +333,6 @@ async fn agents_for_meta(name_to_add: Option<&str>) -> Result<Vec<crate::meta::A
|
|||
&& !out.iter().any(|a| a.name == extra)
|
||||
{
|
||||
out.push(crate::meta::AgentSpec {
|
||||
is_manager: extra == MANAGER_NAME,
|
||||
port: agent_web_port(extra),
|
||||
name: extra.to_owned(),
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue