flake.nix: Build the VM using nix build
This commit is contained in:
parent
544bd0a721
commit
77ddb15f22
11
flake.nix
11
flake.nix
|
@ -73,15 +73,14 @@
|
||||||
###################
|
###################
|
||||||
packages.${system} = let
|
packages.${system} = let
|
||||||
inherit (nixpkgs.legacyPackages.${system}) writeShellScript;
|
inherit (nixpkgs.legacyPackages.${system}) writeShellScript;
|
||||||
in {
|
|
||||||
default = self.packages.${system}.run-vm;
|
|
||||||
|
|
||||||
run-vm = let
|
|
||||||
vm = self.lib.makeNixosSystem {
|
vm = self.lib.makeNixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
extraModules = [(import ./configuration/hardware-specific/vm.nix)];
|
extraModules = [(import ./configuration/hardware-specific/vm.nix)];
|
||||||
};
|
};
|
||||||
|
in {
|
||||||
|
default = vm.config.system.build.vm;
|
||||||
|
|
||||||
|
run-vm = let
|
||||||
qemuNetOpts = self.lib.makeQemuNetOpts {
|
qemuNetOpts = self.lib.makeQemuNetOpts {
|
||||||
"2222" = "2222";
|
"2222" = "2222";
|
||||||
"3080" = "80";
|
"3080" = "80";
|
||||||
|
@ -105,9 +104,7 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
apps.${system} = let
|
apps.${system} = {
|
||||||
inherit (nixpkgs.legacyPackages.${system}) writeShellScript;
|
|
||||||
in {
|
|
||||||
default = {
|
default = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = builtins.toString self.packages.${system}.run-vm;
|
program = builtins.toString self.packages.${system}.run-vm;
|
||||||
|
|
Loading…
Reference in a new issue