make mkFlake per-system

This commit is contained in:
Jeeves 2024-06-24 14:08:21 -06:00
parent 70dd3a104a
commit 0a2dd27902
2 changed files with 21 additions and 19 deletions

View file

@ -33,21 +33,23 @@
# ]; # ];
# }; # };
in { in {
mkFlake = config: let mkFlake = config:
vm = oslib.mkVM { flake-utils.lib.eachDefaultSystem(system:
inherit (config) name uuid; let
beforeInstall = [ vm = oslib.mkVM {
{ index = 1; file = "${osdb.${config.os.name}.${config.os.version}.${config.os.edition}.${config.os.arch}.installer}/out.iso"; } inherit (config) name uuid;
{ index = 2; file = "${osdb.${config.os.name}.${config.os.version}.${config.os.edition}.${config.os.arch}.unattend}/out.iso"; } beforeInstall = [
]; { index = 1; file = "${osdb.${config.os.name}.${config.os.version}.${config.os.edition}.${config.os.arch}.installer}/out.iso"; }
}; { index = 2; file = "${osdb.${config.os.name}.${config.os.version}.${config.os.edition}.${config.os.arch}.unattend}/out.iso"; }
in { ];
packages.volume = vm.volume; };
packages.beforeInstall = vm.beforeInstallDrv; in {
packages.afterInstall = vm.afterInstallDrv; packages.volume = vm.volume;
packages.beforeBoot = vm.beforeBootDrv; packages.beforeInstall = vm.beforeInstallDrv;
packages.afterBoot = vm.afterBootDrv; packages.afterInstall = vm.afterInstallDrv;
}; packages.beforeBoot = vm.beforeBootDrv;
packages.afterBoot = vm.afterBootDrv;
});
apps = { apps = {
# hello-start-vm = flake-utils.lib.mkApp { # hello-start-vm = flake-utils.lib.mkApp {

View file

@ -126,11 +126,11 @@
"zig2nix": "zig2nix" "zig2nix": "zig2nix"
}, },
"locked": { "locked": {
"lastModified": 1719258655, "lastModified": 1719259537,
"narHash": "sha256-bzoB79jZjBrdSk6cRf3OdUUdMmutij9Tl3uvLj3zzFY=", "narHash": "sha256-oHrDpHmZCZY+i3FT3NGPqeQCBoAFu5kLJMe2mRSofDc=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "1531a79212f5ad05439c89ab463aa037f02da4c1", "rev": "70dd3a104a3d42c18586cc8e687f760ab77714e1",
"revCount": 2, "revCount": 3,
"type": "git", "type": "git",
"url": "https://git.jeevio.xyz/jeeves/oslib" "url": "https://git.jeevio.xyz/jeeves/oslib"
}, },