Refactoring configuration
This commit is contained in:
parent
09e3cc520a
commit
a87c269dfc
9 changed files with 336 additions and 287 deletions
19
up.sh
Executable file
19
up.sh
Executable 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 .
|
||||
Loading…
Add table
Add a link
Reference in a new issue