mirror of
https://gitlab.com/ahoneybun/nyxi-installer.git
synced 2025-05-13 11:33:01 -06:00
Compare commits
No commits in common. "743ca7f3dd167e29f7786af4e1d6af863aab7213" and "31cce1d9988384e98843eb7e7f62cbc28de009d9" have entirely different histories.
743ca7f3dd
...
31cce1d998
1 changed files with 13 additions and 13 deletions
26
install.sh
26
install.sh
|
@ -1,3 +1,7 @@
|
||||||
|
# Figure out how much RAM the system has
|
||||||
|
# then sets it as a variable for hibernation support
|
||||||
|
ramTotal=$(free -h | awk '/^Mem:/{print $2}'| awk -FG {'print$1'})
|
||||||
|
|
||||||
# Step 1: Choosing the drive for the installation
|
# Step 1: Choosing the drive for the installation
|
||||||
|
|
||||||
## Detect and list the drives.
|
## Detect and list the drives.
|
||||||
|
@ -7,10 +11,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,12 +23,10 @@ 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 -- --mode disko /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
|
sudo mv /tmp/disko-config.nix /mnt/etc/nixos
|
||||||
|
|
||||||
## Downloads and places the predefinded generic flake to use
|
## Downloads and places the predefinded generic flake to use
|
||||||
|
@ -45,15 +44,13 @@ Which device are you installing to?
|
||||||
1) Virtual Machine
|
1) Virtual Machine
|
||||||
2) Lemur Pro 13 (Garrus)
|
2) Lemur Pro 13 (Garrus)
|
||||||
3) nebula49 (Shepard)
|
3) nebula49 (Shepard)
|
||||||
|
4) Home Server (EDI) - Do Not Use
|
||||||
0) Generic
|
0) Generic
|
||||||
EOF
|
EOF
|
||||||
|
read hostChoice
|
||||||
echo ""
|
|
||||||
read -p "Enter your device choice: " hostChoice
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
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/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
|
||||||
|
|
||||||
elif [ $hostChoice = 2 ]; then
|
elif [ $hostChoice = 2 ]; then
|
||||||
|
@ -66,9 +63,12 @@ elif [ $hostChoice = 3 ]; then
|
||||||
curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/gnome.nix > gnome.nix; sudo mv -f gnome.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#shepard
|
sudo nixos-install --flake /mnt/etc/nixos#shepard
|
||||||
|
|
||||||
|
elif [ $hostChoice = 4 ]; then
|
||||||
|
curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/hosts/x86_64/edi/configuration.nix > edi.nix; sudo mv -f edi.nix /mnt/etc/nixos/
|
||||||
|
sudo nixos-install --flake /mnt/etc/nixos#edi
|
||||||
|
|
||||||
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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue