From 77ddb15f22038cfe537167e81f984b1565a05178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Wed, 11 Jan 2023 01:59:35 +0000 Subject: [PATCH] flake.nix: Build the VM using `nix build` --- flake.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index de2ed54..2aa6c0b 100644 --- a/flake.nix +++ b/flake.nix @@ -73,15 +73,14 @@ ################### packages.${system} = let inherit (nixpkgs.legacyPackages.${system}) writeShellScript; + vm = self.lib.makeNixosSystem { + inherit system; + extraModules = [(import ./configuration/hardware-specific/vm.nix)]; + }; in { - default = self.packages.${system}.run-vm; + default = vm.config.system.build.vm; run-vm = let - vm = self.lib.makeNixosSystem { - inherit system; - extraModules = [(import ./configuration/hardware-specific/vm.nix)]; - }; - qemuNetOpts = self.lib.makeQemuNetOpts { "2222" = "2222"; "3080" = "80"; @@ -105,9 +104,7 @@ ''; }; - apps.${system} = let - inherit (nixpkgs.legacyPackages.${system}) writeShellScript; - in { + apps.${system} = { default = { type = "app"; program = builtins.toString self.packages.${system}.run-vm;