make mkFlake at root of flake

This commit is contained in:
Jeeves 2024-06-24 13:50:55 -06:00
parent 8a816b5e85
commit 1531a79212
5 changed files with 276 additions and 126 deletions

View file

@ -19,25 +19,26 @@
let
pkgs = nixpkgs.legacyPackages.${system};
oslib = import ./os/lib.nix { inherit pkgs system nixvirt; };
inherit (oslib) osdb;
# inherit (oslib) osdb;
zig-env = zig2nix.outputs.zig-env.${system} { zig = zig2nix.outputs.packages.${system}.zig.master.bin; };
hello-vm = oslib.mkVM {
name = "hello";
uuid = "c0c49ae7-6fe4-4c39-a8ae-c80c6b689344";
arch = "x86_64";
isos.beforeInstall = [
{ index = 1; file = "${osdb.windows."6.1.7601".professional.x86_64.installer}/out.iso"; }
{ index = 2; file = "${osdb.windows."6.1.7601".professional.x86_64.unattend}/out.iso"; }
];
};
# hello-vm = oslib.mkVM {
# name = "hello";
# uuid = "c0c49ae7-6fe4-4c39-a8ae-c80c6b689344";
# arch = "x86_64";
# isos.beforeInstall = [
# { index = 1; file = "${osdb.windows."6.1.7601".professional.x86_64.installer}/out.iso"; }
# { index = 2; file = "${osdb.windows."6.1.7601".professional.x86_64.unattend}/out.iso"; }
# ];
# };
in {
inherit (oslib) mkFlake;
apps = {
hello-start-vm = flake-utils.lib.mkApp {
drv = hello-vm.start-vm;
exePath = "";
};
# hello-start-vm = flake-utils.lib.mkApp {
# drv = hello-vm.start-vm;
# exePath = "";
# };
default = zig-env.app-no-root [] "zig build run -- \"$@\"";
};