diff --git a/install.sh b/install.sh index a80817f..73d3d2a 100644 --- a/install.sh +++ b/install.sh @@ -5,8 +5,9 @@ ramTotal=$(free -h | awk '/^Mem:/{print $2}'| awk -FG {'print$1'}) # Detect and list the drives. lsblk -f +# Step 1: Choosing the drive for the installation + # Choice the drive to use : -# 1. echo "----------" echo "Which drive do we want to use for this installation?" read driveName @@ -18,6 +19,8 @@ curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/partitions/luks-btrfs-s # Replace drive in Disko file sudo sed -i "s#/dev/sda#$driveName#g" /tmp/disko-config.nix +# Step 2: Partitioning the drive used for the installation + # Run Disko to partition the disk sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko /tmp/disko-config.nix @@ -25,16 +28,10 @@ sudo nix --experimental-features "nix-command flakes" run github:nix-community/d sudo nixos-generate-config --no-filesystems --root /mnt sudo mv /tmp/disko-config.nix /mnt/etc/nixos -# Copy my base nix configs over -# Change the URL to match where you are hosting your .nix file(s). - -echo "" -echo "Default username and password are in the flake.nix file" -echo "Password is hashed so it is not plaintext" -echo "" - +# Downloads and places the predefinded generic flake to use curl https://gitlab.com/ahoneybun/nix-configs/-/raw/flake/flake.nix > flake.nix; sudo mv -f flake.nix /mnt/etc/nixos/ -#curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/programs.nix > programs.nix; sudo mv -f programs.nix /mnt/etc/nixos/ + +# Step 3: Choosing a predefined system flake file to use cat << EOF @@ -50,9 +47,6 @@ Which device are you installing to? EOF read deviceChoice -# Change the URL to match where you are hosting your system .nix file -# Update the second command to the file name that matches your system .nix file - if [ $deviceChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/systems/x86_64/shepard/configuration.nix > shepard.nix; sudo mv -f shepard.nix /mnt/etc/nixos sudo sed -i "11 i \ ./shepard.nix" /mnt/etc/nixos/configuration.nix @@ -85,6 +79,8 @@ elif [ $deviceChoice = 0 ]; then fi +# Step 4: Choosing a predefined desktop/window manager file to use + cat << EOF Which Desktop Environment do you want? @@ -96,9 +92,6 @@ Which Desktop Environment do you want? EOF read desktopChoice -# Change the URL to match where you are hosting your DE/WM .nix file -# Update the second command to the file name that matches your DE/WM .nix file - if [ $desktopChoice = 1 ]; then curl https://gitlab.com/ahoneybun/nix-configs/-/raw/main/desktops/plasma.nix > plasma.nix; sudo mv -f plasma.nix /mnt/etc/nixos/ sudo sed -i "10 i \ ./plasma.nix" /mnt/etc/nixos/configuration.nix