refactor + ui

This commit is contained in:
JMARyA 2025-01-05 04:33:47 +01:00
parent 7f0fd2c45b
commit a3da9fb9ac
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
6 changed files with 318 additions and 62 deletions

View file

@ -1,3 +1,5 @@
use std::fmt::Display;
use serde::Deserialize;
/// Declarative install configuration
@ -26,7 +28,7 @@ pub struct OllamaConfig {
#[derive(Debug, Deserialize)]
pub struct SSHConfig {
pub sshd_config: Option<String>,
pub key: Vec<SSHKey>,
pub key: Option<Vec<SSHKey>>,
}
#[derive(Debug, Deserialize)]
@ -90,3 +92,16 @@ pub enum InstallMode {
// TODO : Evaluate
Kiosk,
}
impl Display for InstallMode {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
InstallMode::Base => f.write_str("Base")?,
InstallMode::Desktop => f.write_str("Desktop")?,
InstallMode::Server => f.write_str("Server")?,
InstallMode::Kiosk => f.write_str("Kiosk")?,
}
Ok(())
}
}