NixConfigLaptops/nixconf.sh

23 lines
495 B
Bash
Raw Normal View History

2023-02-10 23:10:24 +01:00
#!/bin/bash
echo "replacing config"
cd /etc/nixos/
rm configuration.nix
2023-02-10 23:49:54 +01:00
git clone https://dev.spittank.org/MK/NixConfig/src/branch/main/configuration.nix.git
2023-02-10 23:59:11 +01:00
cp /etc/nixos/NixConfig/configuration.nix /etc/nixos/
rm -r /etc/nixos/NixConfig/
2023-02-10 23:23:46 +01:00
#read -p "name the device number" number
#echo "$number" >> configuration.nix
2023-02-10 23:10:24 +01:00
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