Compare commits
3 Commits
b57227fb60
...
ff73d6aa98
| Author | SHA1 | Date | |
|---|---|---|---|
|
ff73d6aa98
|
|||
|
6537ecdcf7
|
|||
|
0666d5e8ec
|
@@ -7,6 +7,8 @@ services:
|
||||
environment:
|
||||
VERSION: "11"
|
||||
DISK_SIZE: "64G"
|
||||
RAM_SIZE: "8G"
|
||||
CPU_CORES: "4"
|
||||
devices:
|
||||
- /dev/kvm
|
||||
- /dev/net/tun
|
||||
@@ -18,6 +20,7 @@ services:
|
||||
- 3389:3389/udp
|
||||
volumes:
|
||||
- /home/primary/Downloads/tiny11.iso:/custom.iso
|
||||
# - /home/primary/Downloads/26100.1.240331-1435.ge_release_CLIENT_IOT_LTSC_EVAL_x64FRE_en-us.iso:/custom.iso
|
||||
- /home/primary/school/spring-2025/CSE3120/vm/oem:/oem
|
||||
# shared samba dir
|
||||
- /home/primary/school/spring-2025/CSE3120/vm/shared:/data
|
||||
|
||||
48
flake.lock
generated
Normal file
48
flake.lock
generated
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1739736696,
|
||||
"narHash": "sha256-zON2GNBkzsIyALlOCFiEBcIjI4w38GYOb+P+R4S8Jsw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d74a2335ac9c133d6bbec9fc98d91a77f1604c1f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"wfvm": "wfvm"
|
||||
}
|
||||
},
|
||||
"wfvm": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1718082876,
|
||||
"narHash": "sha256-u4OgfsO6jnQwHNmxHhSIfCKaa2gYoIYwGKPJFZSpK/A=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "e811c7c5d87059cb93b6548109fcafb3268a3af1",
|
||||
"revCount": 70,
|
||||
"type": "git",
|
||||
"url": "https://git.m-labs.hk/m-labs/wfvm"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.m-labs.hk/m-labs/wfvm"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
61
flake.nix
Normal file
61
flake.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
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,
|
||||
}:
|
||||
let
|
||||
# import nixpkgs
|
||||
pkgs = (import nixpkgs {});
|
||||
in
|
||||
{
|
||||
packages."${pkgs.system}".windows-vm = wfvm.lib.makeWindowsImage {
|
||||
windowsImage = (pkgs.fetchurl {
|
||||
url = "file:///home/primary/Downloads/tiny11.iso";
|
||||
sha256 = "ea9cee512457c763484dbeaeee98caba8c2e69e0420bdae8c4508e31ad8ccd99";
|
||||
});
|
||||
|
||||
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
|
||||
'';
|
||||
}
|
||||
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -19,7 +19,7 @@ winget install -e --id Microsoft.VisualStudio.2022.BuildTools --accept-source-ag
|
||||
winget install -e --id Microsoft.VisualStudio.2022.Community --accept-source-agreements --override "--passive --wait --add Microsoft.VisualStudio.Workload.NativeDesktop --includeRecommended"
|
||||
|
||||
:: powershell stuff
|
||||
powershell -executionpolicy remotesigned -File C:\OEM\powershell-stuff.ps1
|
||||
:: powershell -executionpolicy remotesigned -File C:\OEM\powershell-stuff.ps1
|
||||
|
||||
|
||||
winget install Mozilla.Firefox --accept-source-agreements
|
||||
|
||||
@@ -45,3 +45,15 @@ rm -Force -Recurse C:\Users\Docker\project64\Project64_VS2022
|
||||
|
||||
# maybe this'll work -- no
|
||||
# Set-ExecutionPolicy -ExecutionPolicy Bypass -Force
|
||||
|
||||
# Mount shared directory as a drive
|
||||
New-PSDrive -Name "Z" -PSProvider "FileSystem" -Root "\\host.lan\Data" -Persist
|
||||
|
||||
# remove Widgets stuff
|
||||
Get-AppxPackage *WebExperience* | Remove-AppxPackage
|
||||
|
||||
# remove animations -- https://superuser.com/a/1811743
|
||||
Set-ItemProperty -Path "HKCU:Control Panel\Desktop" -Name UserPreferencesMask -Value ([byte[]](0x90,0x12,0x03,0x80,0x10,0x00,0x00,0x00))
|
||||
|
||||
# restart explorer
|
||||
stop-process -name explorer -force
|
||||
|
||||
Reference in New Issue
Block a user