auto-install script
This commit is contained in:
parent
78e14cf464
commit
9f46b89e4c
|
@ -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
|
Loading…
Reference in New Issue