Update 'nixconf.sh'
This commit is contained in:
parent
cf0c4e5a69
commit
bbca2cc73a
1 changed files with 11 additions and 7 deletions
12
nixconf.sh
12
nixconf.sh
|
@ -1,16 +1,22 @@
|
|||
#!/bin/bash
|
||||
|
||||
#nix-shell -p git
|
||||
echo "=================================================="
|
||||
echo "replacing config"
|
||||
echo "=================================================="
|
||||
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 "=================================================="
|
||||
read -p "name the device number" number
|
||||
sed -i "s/nixoslaptop/nixoslaptop$number/g" configuration.nix
|
||||
echo "=================================================="
|
||||
echo "generating config"
|
||||
echo "=================================================="
|
||||
nixos-rebuild switch
|
||||
echo "=================================================="
|
||||
while true; do
|
||||
read -p "reboot?" yn
|
||||
case $yn in
|
||||
|
@ -19,5 +25,3 @@ case $yn in
|
|||
* ) echo "Please answer yes or no";;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue