make mkFlake per-system
This commit is contained in:
parent
70dd3a104a
commit
0a2dd27902
2 changed files with 21 additions and 19 deletions
32
flake.nix
32
flake.nix
|
@ -33,21 +33,23 @@
|
|||
# ];
|
||||
# };
|
||||
in {
|
||||
mkFlake = config: let
|
||||
vm = oslib.mkVM {
|
||||
inherit (config) name uuid;
|
||||
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;
|
||||
packages.afterInstall = vm.afterInstallDrv;
|
||||
packages.beforeBoot = vm.beforeBootDrv;
|
||||
packages.afterBoot = vm.afterBootDrv;
|
||||
};
|
||||
mkFlake = config:
|
||||
flake-utils.lib.eachDefaultSystem(system:
|
||||
let
|
||||
vm = oslib.mkVM {
|
||||
inherit (config) name uuid;
|
||||
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;
|
||||
packages.afterInstall = vm.afterInstallDrv;
|
||||
packages.beforeBoot = vm.beforeBootDrv;
|
||||
packages.afterBoot = vm.afterBootDrv;
|
||||
});
|
||||
|
||||
apps = {
|
||||
# hello-start-vm = flake-utils.lib.mkApp {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue