mirror of
https://gitlab.com/ahoneybun/nyxi-installer.git
synced 2025-05-12 11:04:02 -06:00
Compare commits
2 commits
5ca4da94eb
...
c070fcac90
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c070fcac90 | ||
![]() |
0cd5007ae7 |
1 changed files with 25 additions and 7 deletions
32
src/main.rs
32
src/main.rs
|
@ -228,6 +228,17 @@ fn main() {
|
||||||
.output()
|
.output()
|
||||||
.expect("Failed to move nix files over");
|
.expect("Failed to move nix files over");
|
||||||
|
|
||||||
|
// Fixes a security issue with boot
|
||||||
|
let _boot_fix = Command::new("sed")
|
||||||
|
.arg("-i")
|
||||||
|
.arg(r#"/fsType = "vfat"/ {
|
||||||
|
n
|
||||||
|
s/\(options = \[.*\)\]/\1"umask=0077 "]/
|
||||||
|
}"#)
|
||||||
|
.arg("/mnt/etc/nixos/hardware-configuration.nix")
|
||||||
|
.output()
|
||||||
|
.expect("Failed to apply boot fix");
|
||||||
|
|
||||||
// Host selection
|
// Host selection
|
||||||
loop {
|
loop {
|
||||||
println!("");
|
println!("");
|
||||||
|
@ -235,8 +246,7 @@ fn main() {
|
||||||
println!("---------------");
|
println!("---------------");
|
||||||
println!("");
|
println!("");
|
||||||
println!("1. Lemur Pro 13 (Garrus)");
|
println!("1. Lemur Pro 13 (Garrus)");
|
||||||
println!("2. Device 2");
|
println!("2. Generic");
|
||||||
println!("3. Quit");
|
|
||||||
println!("");
|
println!("");
|
||||||
|
|
||||||
println!("Enter your host for installation:");
|
println!("Enter your host for installation:");
|
||||||
|
@ -281,12 +291,20 @@ fn main() {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
"2" => {
|
"2" => {
|
||||||
println!("Nix the world!");
|
let mut nixos_install = Command::new("nixos-install")
|
||||||
},
|
.arg("--flake")
|
||||||
"3" => {
|
.arg("/mnt/etc/nixos#nixos")
|
||||||
println!("Goodbye!");
|
.arg("--no-root-passwd")
|
||||||
|
.stdout(Stdio::inherit())
|
||||||
|
.stderr(Stdio::inherit())
|
||||||
|
.spawn()
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
let install_status = nixos_install.wait();
|
||||||
|
println!("Exited with status {:?}", install_status);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
},
|
},
|
||||||
_ => println!("Invalid choice, try again."),
|
_ => println!("Invalid choice, try again."),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue