46 lines
1.3 KiB
Ruby
46 lines
1.3 KiB
Ruby
Vagrant.configure("2") do |config|
|
|
# Default credentials: vagrant / vagrant
|
|
config.vm.box = "gusztavvargadr/windows-11"
|
|
config.vm.box_version = "2511.0.0"
|
|
|
|
# Sync the project root to C:/winos-config
|
|
config.vm.synced_folder "..", "C:/winos-config"
|
|
|
|
config.vm.provider "virtualbox" do |vb|
|
|
vb.gui = true
|
|
vb.memory = "8192"
|
|
vb.cpus = 6
|
|
vb.customize ["modifyvm", :id, "--graphicscontroller", "vboxsvga"]
|
|
vb.customize ["modifyvm", :id, "--vram", "256"]
|
|
end
|
|
|
|
config.vm.provider "hyperv" do |hv|
|
|
hv.memory = "8192"
|
|
hv.cpus = 6
|
|
end
|
|
|
|
# Provisioning script to install prerequisites
|
|
config.vm.provision "shell", privileged: true, powershell_args: "-ExecutionPolicy Bypass", inline: <<-SHELL
|
|
$winget_ids = @(
|
|
"Git.Git",
|
|
"Oven-sh.Bun",
|
|
"Microsoft.DSC",
|
|
"Casey.Just",
|
|
"junegunn.fzf",
|
|
"Microsoft.PowerShell"
|
|
)
|
|
|
|
Write-Host "Forcing time synchronization to prevent certificate errors..."
|
|
w32tm /resync /force
|
|
|
|
Write-Host "Refreshing WinGet source agreements..."
|
|
winget source update
|
|
|
|
foreach ($id in $winget_ids) {
|
|
Write-Host "Checking/Installing $id..."
|
|
# Use --source winget to avoid disambiguation errors and --force to ensure installation
|
|
winget install --id $id --source winget --accept-source-agreements --accept-package-agreements --silent
|
|
}
|
|
SHELL
|
|
end
|