mirror of
https://gitlab.com/ahoneybun/nyxi-installer.git
synced 2025-05-12 11:04:02 -06:00
clean up cargo warning/info messages
This commit is contained in:
parent
2ffc1c6bf7
commit
4e567a79b0
1 changed files with 14 additions and 14 deletions
26
src/main.rs
26
src/main.rs
|
@ -1,11 +1,11 @@
|
|||
use std::io;
|
||||
use std::io::{stdout, Write};
|
||||
use std::io::Write;
|
||||
use std::fs::File;
|
||||
use std::process::Command;
|
||||
use sys_metrics::disks;
|
||||
use rsfdisk::fdisk::Fdisk;
|
||||
use rsfdisk::core::partition_table::PartitionTableKind;
|
||||
use rsfdisk::core::partition::{Guid, Partition, PartitionKind, PartitionList};
|
||||
use rsfdisk::core::partition::{Guid, Partition, PartitionKind};
|
||||
|
||||
use curl::easy::Easy;
|
||||
|
||||
|
@ -46,7 +46,7 @@ fn format_drive(drive_name: &str) -> rsfdisk::Result<()> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
fn mount_parts() {}
|
||||
// fn mount_parts() {}
|
||||
|
||||
fn grab_flake() {
|
||||
let mut easy = Easy::new();
|
||||
|
@ -128,10 +128,10 @@ fn main() {
|
|||
let drive_name = drive_name.trim();
|
||||
|
||||
// Partitioning the selected drive
|
||||
format_drive(drive_name);
|
||||
let _ = format_drive(drive_name);
|
||||
|
||||
// Formatting the partitions
|
||||
let efi_partition = Command::new("mkfs.fat")
|
||||
let _efi_partition = Command::new("mkfs.fat")
|
||||
.arg("-F32")
|
||||
.arg("-n")
|
||||
.arg("EFI")
|
||||
|
@ -139,7 +139,7 @@ fn main() {
|
|||
.output()
|
||||
.expect("Failed to partition boot partition as FAT32");
|
||||
|
||||
let root_partition = Command::new("mkfs.ext4")
|
||||
let _root_partition = Command::new("mkfs.ext4")
|
||||
.arg("/dev/sda2")
|
||||
.output()
|
||||
.expect("Failed to partition root partition as ext4");
|
||||
|
@ -149,7 +149,7 @@ fn main() {
|
|||
grab_config();
|
||||
grab_home();
|
||||
|
||||
let nixos_gen_config = Command::new("nixos-generate-config")
|
||||
let _nixos_gen_config = Command::new("nixos-generate-config")
|
||||
.arg("no-file-systems")
|
||||
.arg("--root")
|
||||
.arg("/mnt")
|
||||
|
@ -172,15 +172,15 @@ fn main() {
|
|||
|
||||
match choice.trim() {
|
||||
"1" => {
|
||||
let mut garrusConfig = Easy::new();
|
||||
garrusConfig.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/garrus/configuration.nix").unwrap();
|
||||
let mut garrus_config = Easy::new();
|
||||
garrus_config.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/garrus/configuration.nix").unwrap();
|
||||
|
||||
let mut configFile = File::create("configuration.nix").unwrap();
|
||||
let mut config_file = File::create("configuration.nix").unwrap();
|
||||
|
||||
{
|
||||
let mut transfer = garrusConfig.transfer();
|
||||
let mut transfer = garrus_config.transfer();
|
||||
transfer.write_function(|data| {
|
||||
configFile.write_all(data).unwrap();
|
||||
config_file.write_all(data).unwrap();
|
||||
Ok(data.len())
|
||||
}).unwrap();
|
||||
transfer.perform().unwrap();
|
||||
|
@ -188,7 +188,7 @@ fn main() {
|
|||
break
|
||||
}
|
||||
"2" => {
|
||||
let nixos_install = Command::new("nixos-install")
|
||||
let _nixos_install = Command::new("nixos-install")
|
||||
.arg("--flake")
|
||||
.arg("/mnt/etc/nixos#garrus")
|
||||
.output()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue