mirror of
https://gitlab.com/ahoneybun/nyxi-installer.git
synced 2025-05-12 11:04:02 -06:00
make data dir for the nix files to not overwrite the flake
This commit is contained in:
parent
40d030ae75
commit
7408808467
2 changed files with 11 additions and 16 deletions
8
.gitignore
vendored
8
.gitignore
vendored
|
@ -5,10 +5,4 @@
|
||||||
result
|
result
|
||||||
|
|
||||||
# Main nix files
|
# Main nix files
|
||||||
flake.nix
|
/data
|
||||||
configuration.nix
|
|
||||||
home.nix
|
|
||||||
|
|
||||||
# Extra nix files
|
|
||||||
garrus.nix
|
|
||||||
gnome.nix
|
|
||||||
|
|
19
src/main.rs
19
src/main.rs
|
@ -107,7 +107,7 @@ fn grab_flake() {
|
||||||
let mut easy = Easy::new();
|
let mut easy = Easy::new();
|
||||||
easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/rust-rewrite/flake.nix").unwrap();
|
easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/rust-rewrite/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();
|
let mut transfer = easy.transfer();
|
||||||
|
@ -123,7 +123,7 @@ fn grab_config() {
|
||||||
let mut easy = Easy::new();
|
let mut easy = Easy::new();
|
||||||
easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/rust-rewrite/configuration.nix").unwrap();
|
easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/rust-rewrite/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();
|
let mut transfer = easy.transfer();
|
||||||
|
@ -139,7 +139,7 @@ fn grab_home() {
|
||||||
let mut easy = Easy::new();
|
let mut easy = Easy::new();
|
||||||
easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/rust-rewrite/home.nix").unwrap();
|
easy.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/rust-rewrite/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();
|
let mut transfer = easy.transfer();
|
||||||
|
@ -155,7 +155,7 @@ fn grab_gnome(){
|
||||||
let mut gnome_config = Easy::new();
|
let mut gnome_config = Easy::new();
|
||||||
gnome_config.url("https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/gnome.nix").unwrap();
|
gnome_config.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();
|
let mut transfer = gnome_config.transfer();
|
||||||
|
@ -223,7 +223,8 @@ 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(["-f", "flake.nix", "configuration.nix", "home.nix", "/mnt/etc/nixos"])
|
.args(["-f", "data/flake.nix", "data/configuration.nix", "data/home.nix"])
|
||||||
|
.arg("/mnt/etc/nixos")
|
||||||
.output()
|
.output()
|
||||||
.expect("Failed to move nix files over");
|
.expect("Failed to move nix files over");
|
||||||
|
|
||||||
|
@ -259,7 +260,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("garrus.nix").unwrap();
|
let mut config_file = File::create("data/garrus.nix").unwrap();
|
||||||
|
|
||||||
{
|
{
|
||||||
let mut transfer = garrus_config.transfer();
|
let mut transfer = garrus_config.transfer();
|
||||||
|
@ -272,7 +273,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(["garrus.nix", "gnome.nix", "/mnt/etc/nixos"])
|
.args(["data/garrus.nix", "data/gnome.nix", "/mnt/etc/nixos"])
|
||||||
.output()
|
.output()
|
||||||
.expect("Failed to copy nix files over");
|
.expect("Failed to copy nix files over");
|
||||||
|
|
||||||
|
@ -294,7 +295,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("vm.nix").unwrap();
|
let mut config_file = File::create("data/vm.nix").unwrap();
|
||||||
|
|
||||||
{
|
{
|
||||||
let mut transfer = vm_config.transfer();
|
let mut transfer = vm_config.transfer();
|
||||||
|
@ -307,7 +308,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(["vm.nix", "/mnt/etc/nixos"])
|
.args(["data/vm.nix", "/mnt/etc/nixos"])
|
||||||
.output()
|
.output()
|
||||||
.expect("Failed to copy nix files over");
|
.expect("Failed to copy nix files over");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue