Compare commits

..

1 commit

Author SHA1 Message Date
Aaron Honeycutt
f4da78f310 Merge branch 'interface' into 'main'
Interface

See merge request ahoneybun/nyxi-installer!21
2025-02-18 12:57:58 +00:00

View file

@ -7,10 +7,7 @@ lsblk -f
echo "----------" echo "----------"
echo "Which drive do we want to use for this installation?" echo "Which drive do we want to use for this installation?"
echo "For example /dev/sda or /dev/nvme0n1" echo "For example /dev/sda or /dev/nvme0n1"
read driveName
echo ""
read -p "Enter your drive choice: " driveName
echo ""
## Download Disko file ## Download Disko file
cd /tmp cd /tmp
@ -22,17 +19,11 @@ sudo sed -i "s#/dev/sda#$driveName#g" /tmp/disko-config.nix
# Step 2: Partitioning the drive used for the installation # Step 2: Partitioning the drive used for the installation
## Run Disko to partition the disk ## Run Disko to partition the disk
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount /tmp/disko-config.nix --yes-wipe-all-disks sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount /tmp/disko-config.nix
## Generate Nix configuration ## Generate Nix configuration
sudo nixos-generate-config --no-filesystems --root /mnt sudo nixos-generate-config --no-filesystems --root /mnt
## Copies over the disko file for running `nixos-install`
sudo mv /tmp/disko-config.nix /mnt/etc/nixos
## Confirm that partitions are mounted
lsblk -f
## Downloads and places the predefinded generic flake to use ## Downloads and places the predefinded generic flake to use
curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/
@ -52,9 +43,15 @@ Which device are you installing to?
EOF EOF
echo "" echo ""
read -p "Enter your device choice: " hostChoice read -p "Enter your choice: " hostChoice
echo "" echo ""
## Copies over the disko file for running `nixos-install`
sudo mv /tmp/disko-config.nix /mnt/etc/nixos
## Workaround for `no free space` error
sudo nix-collect-garbage
if [ $hostChoice = 1 ]; then if [ $hostChoice = 1 ]; then
curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/vm/configuration.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/vm/configuration.nix > vm.nix; sudo mv -f vm.nix /mnt/etc/nixos/
sudo nixos-install --flake /mnt/etc/nixos#vm sudo nixos-install --flake /mnt/etc/nixos#vm
@ -71,7 +68,6 @@ elif [ $hostChoice = 3 ]; then
elif [ $hostChoice = 0 ]; then elif [ $hostChoice = 0 ]; then
curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/
curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/gnome.nix > gnome.nix; sudo mv -f gnome.nix /mnt/etc/nixos/
sudo nixos-install --flake /mnt/etc/nixos#nixos sudo nixos-install --flake /mnt/etc/nixos#nixos
fi fi