Files
vs2022-vm/flake.nix
2026-05-03 23:48:11 -04:00

58 lines
1.5 KiB
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
wfvm.url = "git+https://git.m-labs.hk/m-labs/wfvm";
# wfvm uses a very old branch of nixpkgs (2023-05-25)
wfvm.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{
self,
nixpkgs,
wfvm,
}:
{
packages."x86_64-linux".windows-vm = wfvm.lib.makeWindowsImage {
windowsImage = (builtins.fetchurl {
url = "https://archive.org/download/tiny11_202509/tiny11.iso";
sha256 = "0pls9207f7qi7xhrn0796isafzjrqjgx2acismydjy1lcdssjad9";
});
installCommands = [
{
name = "execute oem bat";
script =
let
oem_bat = ./oem/install.bat;
in
''
ln -s ${oem_bat} ./oem_bat.bat
win-put oem_bat.bat .
echo Running Oem Bat...
win-exec 'start /wait "" .\oem_bat.bat'
echo Oem Bat finished
'';
}
{
name = "execute powershell";
script =
let
powershell_oem = ./oem/powershell-stuff.ps1;
in
''
ln -s ${powershell_oem} ./oem_ps.ps1
win-put oem_ps.ps1 .
echo Running Oem PS...
win-exec 'start /wait "" powershell -executionpolicy remotesigned -File .\oem_ps.ps1'
echo Oem powershell finished
'';
}
];
};
};
}