Remove Config field and fix Build/Agent hash display

- Remove Config field completely from NixOS section
- Build: now shows NixOS system hash (from /run/current-system)
- Agent: shows cm-dashboard package hash (first 8 chars)

Build and Agent now display different hashes as intended.
This commit is contained in:
Christoffer Martinsson 2025-10-25 14:57:40 +02:00
parent 17b5921d8d
commit d463272cf2

View File

@ -422,16 +422,11 @@ impl SystemWidget {
Span::styled("NixOS:", Typography::widget_title())
]));
let build_text = self.nixos_build.as_deref().unwrap_or("unknown");
lines.push(Line::from(vec![
Span::styled(format!("Build: {}", build_text), Typography::secondary())
]));
let config_text = self.config_hash.as_deref().unwrap_or("unknown");
lines.push(Line::from(vec![
Span::styled(format!("Config: {}", config_text), Typography::secondary())
Span::styled(format!("Build: {}", config_text), Typography::secondary())
]));
let agent_hash_text = self.agent_hash.as_deref().unwrap_or("unknown");
let short_hash = if agent_hash_text.len() > 8 && agent_hash_text != "unknown" {
&agent_hash_text[..8]