From 68992f08078cf7278bed3e59ffd85ae5502fbfcd Mon Sep 17 00:00:00 2001 From: jolheiser Date: Wed, 14 May 2025 11:49:11 -0500 Subject: [PATCH] add app script to flake for VM --- flake.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/flake.nix b/flake.nix index cc9a21a..ae47584 100644 --- a/flake.nix +++ b/flake.nix @@ -68,5 +68,21 @@ } ]; }; + apps = forAllSystems ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + vm = { + type = "app"; + program = "${pkgs.writeShellScript "vm" '' + nixos-rebuild build-vm --flake .#ugitVM + ./result/bin/run-nixos-vm + rm nixos.qcow2 + ''}"; + }; + } + ); }; }