move mkFlake to flake
This commit is contained in:
parent
1531a79212
commit
70dd3a104a
4 changed files with 34 additions and 41 deletions
22
os/lib.nix
22
os/lib.nix
|
@ -13,6 +13,9 @@
|
|||
format.type = "qcow2";
|
||||
};
|
||||
};
|
||||
in {
|
||||
inherit osdb;
|
||||
|
||||
mkVM = {
|
||||
name,
|
||||
uuid,
|
||||
|
@ -62,23 +65,4 @@
|
|||
}) (afterBoot);
|
||||
}));
|
||||
};
|
||||
in {
|
||||
inherit osdb;
|
||||
|
||||
mkFlake = config: let
|
||||
vm = 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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue