auto-install script

This commit is contained in:
shynd 2025-02-20 13:40:24 +01:00
parent 78e14cf464
commit 9f46b89e4c
1 changed files with 18 additions and 0 deletions

View File

@ -178,4 +178,22 @@ sed -i 's/host\s*=\s*"\([^"]*\)"/host = "'"$hostName"'"/' ./flake.nix
printf "\n%.0s" {1..2} printf "\n%.0s" {1..2}
echo "${NOTE} rebuilding nixos, this will take some time..." 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