mirror of
https://github.com/morten-olsen/nixos-config.git
synced 2026-02-08 00:36:27 +01:00
added vm build
This commit is contained in:
8
os.sh
8
os.sh
@@ -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
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user