From 027459d62967d21cb792aae1c33562b3535ccc53 Mon Sep 17 00:00:00 2001 From: Tyler Kelley Date: Mon, 11 Mar 2024 15:57:46 -0500 Subject: [PATCH] Remove extra packages as not working as intended --- install-zaneyos.sh | 59 +++++++++++----------------------------------- 1 file changed, 14 insertions(+), 45 deletions(-) diff --git a/install-zaneyos.sh b/install-zaneyos.sh index bf2ed7a..7620438 100755 --- a/install-zaneyos.sh +++ b/install-zaneyos.sh @@ -189,6 +189,20 @@ sed -i "/^\s*kdenlive[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$kdenlive\"/" ./ echo "-----" +read -p "Install Zero AD Game: [ false ] " enableZeroAD +user_input_lower=$(echo "$enableZeroAD" | tr '[:upper:]' '[:lower:]') +case $user_input_lower in + y|yes|true|t|enable) + zeroad="true" + ;; + *) + zeroad="false" + ;; +esac +sed -i "/^\s*enableZeroAD[[:space:]]*=[[:space:]]*\"/s/\"\(.*\)\"/\"$zeroad\"/" ./options.nix + +echo "-----" + read -p "Install Syncthing: [ false ] " enableSyncthing user_input_lower=$(echo "$enableSyncthing" | tr '[:upper:]' '[:lower:]') case $user_input_lower in @@ -300,51 +314,6 @@ sudo nixos-generate-config --show-hardware-config > hardware.nix echo "-----" -# Ask if the user wants to install extra packages then if -# it's for user or system. -userpath="/home/$userName/zaneyos/config/home/packages.nix" -systempath="/home/$userName/zaneyos/config/system/packages.nix" -insertedUserProgram=false -insertedSystemProgram=false -while true; do - read -p "Install An Extra Package? [ false ] " addProgram - user_input_lower=$(echo "$addProgram" | tr '[:upper:]' '[:lower:]') - case $user_input_lower in - y|yes|true|t|enable|i|install) - read -p "Install For Just User? [ false ] " userOrSystem - user_input_lower=$(echo "$userOrSystem" | tr '[:upper:]' '[:lower:]') - case $user_input_lower in - y|yes|true|t|enable|i|install) - if [ $insertedUserProgram == false ]; then - read -p "Enter Name Of Package: " packageName - sed -i "/home.packages/a $packageName" $userpath - insertedUserProgram=true - else - oldPackage=$packageName - read -p "Enter Name Of Package: " packageName - sed -i "/$oldPackage/a $packageName" $userpath - fi - ;; - *) - if [ $insertedSystemProgram == false ]; then - read -p "Enter Name Of Package: " packageName - sed -i "/environment.systemPackages/a $packageName" $systempath - insertedSystemProgram=true - else - oldPackage=$packageName - read -p "Enter Name Of Package: " packageName - # Use sed to insert terminal1 after the specified line - sed -i "/$oldPackage/a $packageName" $systempath - fi - ;; - esac - ;; - *) - break - ;; - esac -done - echo "Now Going To Build ZaneyOS, 🤞" NIX_CONFIG="experimental-features = nix-command flakes" sudo nixos-rebuild switch --flake .#$hostName