Compare commits

...

2 commits

Author SHA1 Message Date
Aaron Honeycutt
c070fcac90 remove quit as it is after the formatting so pointless 2025-04-19 22:38:12 -06:00
Aaron Honeycutt
0cd5007ae7 add boot permission fix 2025-04-19 22:12:53 -06:00

View file

@ -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."),
} }
} }