This commit is contained in:
parent
c689ee87d4
commit
633a0ef410
6 changed files with 65 additions and 15 deletions
|
@ -3,7 +3,7 @@ use std::fmt::Display;
|
|||
use serde::Deserialize;
|
||||
|
||||
/// Declarative install configuration
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct InstallConfig {
|
||||
/// Drive Configuration
|
||||
pub drive: DriveConfig,
|
||||
|
@ -19,32 +19,33 @@ pub struct InstallConfig {
|
|||
pub ai: Option<OllamaConfig>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct OllamaConfig {
|
||||
pub models: Option<Vec<String>>,
|
||||
pub gpu: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct SSHConfig {
|
||||
pub sshd_config: Option<String>,
|
||||
pub key: Option<Vec<SSHKey>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct SSHKey {
|
||||
pub key: String,
|
||||
pub users: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct UserConfig {
|
||||
pub name: String,
|
||||
pub password: String,
|
||||
pub doas_root: bool,
|
||||
pub doas_root: Option<bool>,
|
||||
pub docker: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct PackageConfig {
|
||||
/// Packages to install
|
||||
pub pkg: Vec<String>,
|
||||
|
@ -54,7 +55,7 @@ pub struct PackageConfig {
|
|||
pub docker: Option<bool>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct DriveConfig {
|
||||
/// Boot Drive Path
|
||||
pub boot: String,
|
||||
|
@ -64,7 +65,7 @@ pub struct DriveConfig {
|
|||
pub encryption: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub struct GeneralConfig {
|
||||
/// Presets
|
||||
pub mode: InstallMode,
|
||||
|
@ -82,7 +83,7 @@ pub struct GeneralConfig {
|
|||
pub root_password: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
pub enum InstallMode {
|
||||
/// Basic Arch Linux Installation
|
||||
Base,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue