flake.nix: Build the VM using nix build

This commit is contained in:
Tristan Daniël Maat 2023-01-11 01:59:35 +00:00
parent 544bd0a721
commit 77ddb15f22
Signed by: tlater
GPG key ID: 49670FD774E43268

View file

@ -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;