Implement unified system widget with NixOS info, CPU, RAM, and Storage

- Create NixOS collector for version and active users detection
- Add SystemWidget combining all system information in TODO.md layout
- Replace separate CPU/Memory widgets with unified system display
- Add tree structure for storage with drive temperature/wear info
- Support NixOS version, active users, load averages, memory usage
- Follow exact decimal formatting from specification
This commit is contained in:
2025-10-23 14:01:14 +02:00
parent c99e0bd8ee
commit 39fc9cd22f
9 changed files with 697 additions and 63 deletions

View File

@@ -7,7 +7,7 @@ use tracing::{debug, error, info};
use crate::cache::MetricCacheManager;
use crate::collectors::{
backup::BackupCollector, cpu::CpuCollector, disk::DiskCollector, memory::MemoryCollector,
systemd::SystemdCollector, Collector,
nixos::NixOSCollector, systemd::SystemdCollector, Collector,
};
use crate::config::{AgentConfig, CollectorConfig};
@@ -100,6 +100,12 @@ impl MetricCollectionManager {
collectors.push(Box::new(backup_collector));
info!("Backup collector initialized");
}
if config.nixos.enabled {
let nixos_collector = NixOSCollector::new(config.nixos.clone());
collectors.push(Box::new(nixos_collector));
info!("NixOS collector initialized");
}
}
}