From 2b3fddfe8936cce04be0021bb68c8f2a8f930b78 Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Mon, 25 Mar 2024 15:47:22 -0600 Subject: [PATCH] use correct serverconfig type --- core/startos/src/os_install/mod.rs | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/core/startos/src/os_install/mod.rs b/core/startos/src/os_install/mod.rs index 55c333fba..49d61caad 100644 --- a/core/startos/src/os_install/mod.rs +++ b/core/startos/src/os_install/mod.rs @@ -7,6 +7,7 @@ use rpc_toolkit::{command, from_fn_async, AnyContext, HandlerExt, ParentHandler} use serde::{Deserialize, Serialize}; use tokio::process::Command; +use crate::context::config::ServerConfig; use crate::context::{CliContext, InstallContext}; use crate::disk::mount::filesystem::bind::Bind; use crate::disk::mount::filesystem::block_dev::BlockDev; @@ -23,14 +24,6 @@ use crate::ARCH; mod gpt; mod mbr; -#[derive(Debug, Deserialize, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct PostInstallConfig { - os_partitions: OsPartitionInfo, - ethernet_interface: String, - wifi_interface: Option, -} - pub fn install() -> ParentHandler { ParentHandler::new() .subcommand("disk", disk()) @@ -263,10 +256,11 @@ pub async fn execute( tokio::fs::write( rootfs.path().join("config/config.yaml"), - IoFormat::Yaml.to_vec(&PostInstallConfig { - os_partitions: part_info.clone(), - ethernet_interface: eth_iface, + IoFormat::Yaml.to_vec(&ServerConfig { + os_partitions: Some(part_info.clone()), + ethernet_interface: Some(eth_iface), wifi_interface: wifi_iface, + ..Default::default() })?, ) .await?;