Refactoring configuration

This commit is contained in:
Lyes Saadi 2024-04-10 01:08:29 +02:00
parent 09e3cc520a
commit a87c269dfc
No known key found for this signature in database
GPG key ID: 17418538BAA17767
9 changed files with 336 additions and 287 deletions

19
up.sh Executable file
View file

@ -0,0 +1,19 @@
#!/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 .