remove funny messages and now boot mounts?

This commit is contained in:
Aaron Honeycutt 2025-04-11 06:14:32 -06:00
parent 24febde5f7
commit 92a1b02e02

View file

@ -1,6 +1,5 @@
use std::io;
use std::io::Write;
use std::fs;
use std::fs::File;
use std::process::Command;
use std::path::Path;
@ -10,7 +9,6 @@ use rsfdisk::core::partition_table::PartitionTableKind;
use rsfdisk::core::partition::{Guid, Partition, PartitionKind};
use nix::mount::{mount, MsFlags};
use std::os::unix::ffi::OsStrExt;
use curl::easy::Easy;
fn format_drive(drive_name: &str) -> rsfdisk::Result<()> {
@ -213,7 +211,7 @@ fn main() {
// Mounting the partitions
mount_root();
// mount_boot();
mount_boot();
// Download nix files
grab_flake();
@ -227,12 +225,14 @@ fn main() {
.output()
.expect("Failed to execute command");
println!("");
println!("-------------------------");
println!("Water packed!");
println!("Treats packed!");
println!("We're ready for our walk!");
println!("-------------------------");
// Copies the nix files to /mnt/etc/nixos/
let _nix_copy = Command::new("cp")
.arg("flake.nix")
.arg("configuration.nix")
.arg("home.nix")
.arg("/mnt/etc/nixos")
.output()
.expect("Failed to copy nix files over");
// Host selection
loop {
@ -266,12 +266,21 @@ fn main() {
transfer.perform().unwrap();
}
let _nixos_install = Command::new("nixos-install")
// Copies the system nix files to /mnt/etc/nixos/
let _nix_copy = Command::new("cp")
.arg("garrus.nix")
.arg("/mnt/etc/nixos")
.output()
.expect("Failed to copy nix files over");
let nixos_install = Command::new("nixos-install")
.arg("--flake")
.arg("/mnt/etc/nixos#garrus")
.output()
.expect("Failed to execute command");
println!("stdout:\n{}", String::from_utf8_lossy(&nixos_install.stdout));
break
}
"2" => {