refactor + ui
This commit is contained in:
parent
7f0fd2c45b
commit
a3da9fb9ac
6 changed files with 318 additions and 62 deletions
|
@ -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(())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue