add docker support
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
JMARyA 2025-01-05 05:15:14 +01:00
parent c689ee87d4
commit 633a0ef410
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
6 changed files with 65 additions and 15 deletions

View file

@ -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,