added vm build

This commit is contained in:
Morten Olsen
2023-09-26 23:06:26 +02:00
parent c0aeb8ec57
commit d4cb33b54d
10 changed files with 144 additions and 2 deletions

8
os.sh
View File

@@ -20,6 +20,11 @@ function apply() {
fi
}
function buildvm() {
nixos-rebuild build-vm --flake "$LOCATION#vm"
"$LOCATION/result/bin/run-test-vm-vm"
}
function upgrade() {
if git -C "$LOCATION" diff-index --quiet HEAD --; then
nix flake update --commit-lock-file "$LOCATION"
@@ -54,6 +59,9 @@ case $ACTION in
upgrade)
upgrade $1
;;
build-vm)
buildvm $1
;;
cleanup)
cleanup $1
;;