From e0441d161bdf39f3246de311445c52006e147b3e Mon Sep 17 00:00:00 2001 From: Wroclaw Date: Fri, 22 Dec 2023 00:54:10 +0100 Subject: [PATCH] add vm helper script this script builds and launches vm with configuration, and removes the img after closing vm note that you shulre remove from configuration.nix device specific entries (like hdds, network adapters) --- .gitignore | 1 + vm.sh | 1 + 2 files changed, 2 insertions(+) create mode 100755 vm.sh diff --git a/.gitignore b/.gitignore index c93fdee..456ec08 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ device-configuration.nix hardware-configuration.nix result +*.qcow2 \ No newline at end of file diff --git a/vm.sh b/vm.sh new file mode 100755 index 0000000..d8edd01 --- /dev/null +++ b/vm.sh @@ -0,0 +1 @@ +nix-build '' -A vm -I nixpkgs=channel:nixos-23.11 -I nixos-config=./configuration.nix && $(ls ./result/bin/run-*) && rm *.qcow2