fix issue with data directory

This commit is contained in:
Aaron Honeycutt 2025-04-24 12:56:56 -06:00
parent 6aa6d925f1
commit c56acc8a33

View file

@ -114,7 +114,7 @@ fn grab_flake() {
easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix") easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix")
.unwrap(); .unwrap();
let mut file = File::create("data/flake.nix").unwrap(); let mut file = File::create("flake.nix").unwrap();
{ {
let mut transfer = easy.transfer(); let mut transfer = easy.transfer();
@ -133,7 +133,7 @@ fn grab_config() {
easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/configuration.nix") easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/configuration.nix")
.unwrap(); .unwrap();
let mut file = File::create("data/configuration.nix").unwrap(); let mut file = File::create("configuration.nix").unwrap();
{ {
let mut transfer = easy.transfer(); let mut transfer = easy.transfer();
@ -152,7 +152,7 @@ fn grab_home() {
easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/home.nix") easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/home.nix")
.unwrap(); .unwrap();
let mut file = File::create("data/home.nix").unwrap(); let mut file = File::create("home.nix").unwrap();
{ {
let mut transfer = easy.transfer(); let mut transfer = easy.transfer();
@ -172,7 +172,7 @@ fn grab_gnome() {
.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/gnome.nix") .url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/gnome.nix")
.unwrap(); .unwrap();
let mut config_file = File::create("data/gnome.nix").unwrap(); let mut config_file = File::create("gnome.nix").unwrap();
{ {
let mut transfer = gnome_config.transfer(); let mut transfer = gnome_config.transfer();
@ -245,12 +245,7 @@ fn main() {
// Copies the nix files to /mnt/etc/nixos/ // Copies the nix files to /mnt/etc/nixos/
let _nix_move = Command::new("mv") let _nix_move = Command::new("mv")
.args([ .args(["-f", "flake.nix", "configuration.nix", "home.nix"])
"-f",
"data/flake.nix",
"data/configuration.nix",
"data/home.nix",
])
.arg("/mnt/etc/nixos") .arg("/mnt/etc/nixos")
.output() .output()
.expect("Failed to move nix files over"); .expect("Failed to move nix files over");
@ -289,7 +284,7 @@ fn main() {
let mut garrus_config = Easy::new(); let mut garrus_config = Easy::new();
garrus_config.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/garrus/configuration.nix").unwrap(); garrus_config.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/garrus/configuration.nix").unwrap();
let mut config_file = File::create("data/garrus.nix").unwrap(); let mut config_file = File::create("garrus.nix").unwrap();
{ {
let mut transfer = garrus_config.transfer(); let mut transfer = garrus_config.transfer();
@ -304,7 +299,7 @@ fn main() {
// Copies the system nix files to /mnt/etc/nixos/ // Copies the system nix files to /mnt/etc/nixos/
let _garrus_nix_copy = Command::new("mv") let _garrus_nix_copy = Command::new("mv")
.args(["data/garrus.nix", "data/gnome.nix", "/mnt/etc/nixos"]) .args(["garrus.nix", "gnome.nix", "/mnt/etc/nixos"])
.output() .output()
.expect("Failed to copy nix files over"); .expect("Failed to copy nix files over");
@ -326,7 +321,7 @@ fn main() {
let mut vm_config = Easy::new(); let mut vm_config = Easy::new();
vm_config.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/vm/configuration.nix").unwrap(); vm_config.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/vm/configuration.nix").unwrap();
let mut config_file = File::create("data/vm.nix").unwrap(); let mut config_file = File::create("vm.nix").unwrap();
{ {
let mut transfer = vm_config.transfer(); let mut transfer = vm_config.transfer();
@ -341,7 +336,7 @@ fn main() {
// Copies the system nix files to /mnt/etc/nixos/ // Copies the system nix files to /mnt/etc/nixos/
let _garrus_nix_copy = Command::new("mv") let _garrus_nix_copy = Command::new("mv")
.args(["data/vm.nix", "/mnt/etc/nixos"]) .args(["vm.nix", "/mnt/etc/nixos"])
.output() .output()
.expect("Failed to copy nix files over"); .expect("Failed to copy nix files over");