diff --git a/auto-install.sh b/auto-install.sh index 7b5d531..2195075 100755 --- a/auto-install.sh +++ b/auto-install.sh @@ -178,4 +178,22 @@ sed -i 's/host\s*=\s*"\([^"]*\)"/host = "'"$hostName"'"/' ./flake.nix printf "\n%.0s" {1..2} echo "${NOTE} rebuilding nixos, this will take some time..." +echo "-----" +printf "\n%.0s" {1..2} + +# set the nix configuration for experimental features +NIX_CONFIG="experimental-features = nix-command flakes" +# sudo nix flake update +sudo nixos-rebuild switch --flake ~/nixos-config/#"${hostName}" + +echo "-----" +printf "\n%.0s" {1..2} + +# for initial zsh +# check if ~/.zshrc exists, create a backup, and copy the new configuration +if [ -f "$HOME/.zshrc" ]; then + cp -b "$HOME/.zshrc" "$HOME/.zshrc-backup" || true +fi + +# TODO \ No newline at end of file