diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6bf9262..3801a8c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -53,6 +53,7 @@ release-job: - echo "======== RELEASE JOB ========" rules: - if: $CI_COMMIT_TAG + when: never # Do not run this job when a tag is created manually - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # Run this job when commits are pushed or merged to the default branch release: tag_name: "v$PKG_VERSION" diff --git a/Cargo.toml b/Cargo.toml index 2e8fa81..69aee11 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nyxi-installer" -version = "2.0.2" +version = "2.0.0" edition = "2021" [dependencies] diff --git a/src/main.rs b/src/main.rs index 372549f..7638f49 100644 --- a/src/main.rs +++ b/src/main.rs @@ -114,7 +114,7 @@ fn grab_flake() { easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix") .unwrap(); - let mut file = File::create("flake.nix").unwrap(); + let mut file = File::create("data/flake.nix").unwrap(); { let mut transfer = easy.transfer(); @@ -133,7 +133,7 @@ fn grab_config() { easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/configuration.nix") .unwrap(); - let mut file = File::create("configuration.nix").unwrap(); + let mut file = File::create("data/configuration.nix").unwrap(); { let mut transfer = easy.transfer(); @@ -152,7 +152,7 @@ fn grab_home() { easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/home.nix") .unwrap(); - let mut file = File::create("home.nix").unwrap(); + let mut file = File::create("data/home.nix").unwrap(); { let mut transfer = easy.transfer(); @@ -172,7 +172,7 @@ fn grab_gnome() { .url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/gnome.nix") .unwrap(); - let mut config_file = File::create("gnome.nix").unwrap(); + let mut config_file = File::create("data/gnome.nix").unwrap(); { let mut transfer = gnome_config.transfer(); @@ -245,7 +245,12 @@ fn main() { // Copies the nix files to /mnt/etc/nixos/ let _nix_move = Command::new("mv") - .args(["-f", "flake.nix", "configuration.nix", "home.nix"]) + .args([ + "-f", + "data/flake.nix", + "data/configuration.nix", + "data/home.nix", + ]) .arg("/mnt/etc/nixos") .output() .expect("Failed to move nix files over"); @@ -284,7 +289,7 @@ fn main() { let mut garrus_config = Easy::new(); garrus_config.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/garrus/configuration.nix").unwrap(); - let mut config_file = File::create("garrus.nix").unwrap(); + let mut config_file = File::create("data/garrus.nix").unwrap(); { let mut transfer = garrus_config.transfer(); @@ -299,7 +304,7 @@ fn main() { // Copies the system nix files to /mnt/etc/nixos/ let _garrus_nix_copy = Command::new("mv") - .args(["garrus.nix", "gnome.nix", "/mnt/etc/nixos"]) + .args(["data/garrus.nix", "data/gnome.nix", "/mnt/etc/nixos"]) .output() .expect("Failed to copy nix files over"); @@ -321,7 +326,7 @@ fn main() { let mut vm_config = Easy::new(); vm_config.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/vm/configuration.nix").unwrap(); - let mut config_file = File::create("vm.nix").unwrap(); + let mut config_file = File::create("data/vm.nix").unwrap(); { let mut transfer = vm_config.transfer(); @@ -336,7 +341,7 @@ fn main() { // Copies the system nix files to /mnt/etc/nixos/ let _garrus_nix_copy = Command::new("mv") - .args(["vm.nix", "/mnt/etc/nixos"]) + .args(["data/vm.nix", "/mnt/etc/nixos"]) .output() .expect("Failed to copy nix files over");