23 lines
516 B
Rust
23 lines
516 B
Rust
mod setup;
|
|
mod steps;
|
|
|
|
use crate::steps::{install_autostart, set_passwords};
|
|
use setup::Setup;
|
|
use steps::{init_first_boot, init_network, init_os, install_packages, prepare_img};
|
|
|
|
const IMAGE_SIZE_GB: u64 = 2;
|
|
|
|
fn main() -> anyhow::Result<()> {
|
|
let setup = Setup::load()?;
|
|
|
|
let img = prepare_img()?;
|
|
init_os(&setup, &img)?;
|
|
init_network(&img, &setup)?;
|
|
install_packages(&img, &setup)?;
|
|
install_autostart(&img, &setup)?;
|
|
init_first_boot(&img)?;
|
|
set_passwords(&img, &setup)?;
|
|
|
|
eprintln!("SUCCESS");
|
|
Ok(())
|
|
}
|