diff --git a/src/main.rs b/src/main.rs index d165520..a00d85f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -130,14 +130,28 @@ fn main() { // Partitioning the selected drive format_drive(drive_name); - // placeholder for nix-generate-config + // Formatting the partitions + let efi_partition = Command::new("mkfs.fat") + .arg("-F32") + .arg("-n") + .arg("EFI") + .arg("/dev/sda1") + .output() + .expect("Failed to partition boot partition as FAT32"); + + let root_partition = Command::new("mkfs.btrfs") + .arg("-L") + .arg("root") + .arg("/dev/sda1") + .output() + .expect("Failed to partition root partition as BTRFS"); // Download nix files grab_flake(); 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") @@ -176,9 +190,10 @@ 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() .expect("Fiale to execute command"); }, "3" => {