mirror of
https://gitlab.com/ahoneybun/nyxi-installer.git
synced 2025-05-12 11:04:02 -06:00
add garrus to the host menu
This commit is contained in:
parent
8b16d6c481
commit
e47764618a
1 changed files with 17 additions and 25 deletions
42
src/main.rs
42
src/main.rs
|
@ -49,29 +49,6 @@ fn format_drive(drive_name: &str) -> rsfdisk::Result<()> {
|
|||
|
||||
fn mount_parts() {}
|
||||
|
||||
// fn grab_configs() {
|
||||
// let mut flakeConfig = Easy::new();
|
||||
// let mut mainConfig = Easy::new();
|
||||
// let mut homeConfig = Easy::new();
|
||||
|
||||
// flakeConfig.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix").unwrap();
|
||||
// mainConfig.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/configuration.nix").unwrap();
|
||||
// homeConfig.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/home.nix").unwrap();
|
||||
|
||||
// let mut flakeFile = File::create("flake.nix").unwrap();
|
||||
// let mut mainFile = File::create("configuration.nix").unwrap();
|
||||
// let mut homeFile = File::create("home.nix").unwrap();
|
||||
|
||||
// {
|
||||
// let mut flakeTransfer = easy.transfer();
|
||||
// transfer.write_function(|data| {
|
||||
// flakeFile.write_all(data).unwrap();
|
||||
// Ok(data.len())
|
||||
// }).unwrap();
|
||||
// transfer.perform().unwrap();
|
||||
// }
|
||||
// }
|
||||
|
||||
fn grab_flake() {
|
||||
let mut easy = Easy::new();
|
||||
easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix").unwrap();
|
||||
|
@ -172,7 +149,7 @@ fn main() {
|
|||
loop {
|
||||
println!("");
|
||||
println!("Host selection");
|
||||
println!("1. Device 1");
|
||||
println!("1. Lemur Pro 13 (Garrus)");
|
||||
println!("2. Device 2");
|
||||
println!("3. Device 3");
|
||||
println!("");
|
||||
|
@ -183,7 +160,22 @@ fn main() {
|
|||
io::stdin().read_line(&mut choice).unwrap();
|
||||
|
||||
match choice.trim() {
|
||||
"1" => println!("Hello, world!"),
|
||||
"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 configFile = File::create("configuration.nix").unwrap();
|
||||
|
||||
{
|
||||
let mut transfer = garrusConfig.transfer();
|
||||
transfer.write_function(|data| {
|
||||
configFile.write_all(data).unwrap();
|
||||
Ok(data.len())
|
||||
}).unwrap();
|
||||
transfer.perform().unwrap();
|
||||
}
|
||||
break
|
||||
}
|
||||
"2" => {
|
||||
println!("2 + 2 = {}", 2 + 2);
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue