NixConfigLaptops/nixconf.sh

39 lines
1.4 KiB
Bash
Raw Permalink Normal View History

2023-02-28 18:04:50 +01:00
#!/usr/bin/env bash
2023-02-10 23:10:24 +01:00
2023-02-12 15:49:57 +01:00
#Wlan password:
2023-02-24 13:49:16 +01:00
#pw="enter password here"
2023-02-24 16:06:55 +01:00
#nix-shell -p git
2023-02-24 15:02:02 +01:00
#echo "=================================================="
#echo "copy configuration"
#cp config.tar.gz /home/
2023-02-24 14:59:04 +01:00
echo "=================================================="
2023-02-12 10:15:11 +01:00
echo "replacing config"
echo "=================================================="
2023-02-10 23:10:24 +01:00
cd /etc/nixos/
rm configuration.nix
2023-02-24 16:06:55 +01:00
#git clone https://dev.spittank.org/SchoolDeviceMaintainers/NixConfigLaptops.git
2023-03-02 09:50:16 +01:00
cp ~/NixConfigLaptops/configuration.nix /etc/nixos/
2023-03-01 22:28:50 +01:00
#rm -r /etc/nixos/NixConfigLaptops/
2023-02-12 10:15:11 +01:00
echo "=================================================="
2023-02-24 10:47:00 +01:00
sudo nmcli device wifi connect gy-sedan14-wpa2 password "hier einfügen" hidden yes
echo "=================================================="
2023-02-12 15:49:57 +01:00
read -p "name the device number" number
2023-02-16 17:23:38 +01:00
sed -i "s/nixoslaptop/nixoslaptop$number/g" configuration.nix
2023-02-24 13:36:51 +01:00
#sed -i "s/xxxYYYxxx/$pw/g" configuration.nix
2023-02-12 10:15:11 +01:00
echo "=================================================="
echo "generating config"
echo "=================================================="
2023-02-10 23:10:24 +01:00
nixos-rebuild switch
2023-02-12 10:15:11 +01:00
echo "=================================================="
2023-02-28 18:58:39 +01:00
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install flathub org.kde.kdenlive
echo "=================================================="
2023-02-10 23:10:24 +01:00
while true; do
read -p "reboot?" yn
case $yn in
[Yy]* ) reboot;;
[Nn]* ) exit;;
2023-02-12 10:15:11 +01:00
* ) echo "Please answer yes or no";;
2023-02-10 23:10:24 +01:00
esac
done