19 lines
357 B
Bash
Executable file
19 lines
357 B
Bash
Executable file
#!/bin/sh
|
|
|
|
rm *.qcow2 result 2> /dev/null
|
|
|
|
# if [ -n "$1" ]; then
|
|
# echo "Changing hardware"
|
|
# cp hardware/"$1".nix hardware.nix
|
|
# exit 0
|
|
# fi
|
|
|
|
if [ "$EUID" -ne 0 ]; then
|
|
echo "Please run as root"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Updating configuration"
|
|
rm hardware-configuration.nix
|
|
sudo cp -rf * /etc/nixos/
|
|
cp /etc/nixos/hardware-configuration.nix .
|