#!/usr/bin/env bash #Wlan password: #pw="enter password here" #nix-shell -p git #echo "==================================================" #echo "copy configuration" #cp config.tar.gz /home/ echo "==================================================" echo "replacing config" echo "==================================================" cd /etc/nixos/ rm configuration.nix #git clone https://dev.spittank.org/SchoolDeviceMaintainers/NixConfigLaptops.git cp /home/lokoala/NixConfigLaptops/configuration.nix /etc/nixos/ #rm -r /etc/nixos/NixConfigLaptops/ echo "==================================================" sudo nmcli device wifi connect gy-sedan14-wpa2 password "hier einfügen" hidden yes echo "==================================================" read -p "name the device number" number sed -i "s/nixoslaptop/nixoslaptop$number/g" configuration.nix #sed -i "s/xxxYYYxxx/$pw/g" configuration.nix echo "==================================================" echo "generating config" echo "==================================================" nixos-rebuild switch echo "==================================================" flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo flatpak install flathub org.kde.kdenlive echo "==================================================" while true; do read -p "reboot?" yn case $yn in [Yy]* ) reboot;; [Nn]* ) exit;; * ) echo "Please answer yes or no";; esac done