22 lines
461 B
Bash
22 lines
461 B
Bash
#!/bin/bash
|
|
|
|
echo "replacing config"
|
|
cd /etc/nixos/
|
|
rm configuration.nix
|
|
git clone https://dev.spittank.org/MK/NixConfig.git
|
|
cp /etc/nixos/NixConfig/configuration.nix /etc/nixos/
|
|
rm -r /etc/nixos/NixConfig/
|
|
#read -p "name the device number" number
|
|
#echo "$number" >> configuration.nix
|
|
echo "generating config"
|
|
nixos-rebuild switch
|
|
while true; do
|
|
read -p "reboot?" yn
|
|
case $yn in
|
|
[Yy]* ) reboot;;
|
|
[Nn]* ) exit;;
|
|
* ) echo "Please answer yes or no";;
|
|
esac
|
|
done
|
|
|
|
|