# -*- mode: ruby -*-
# vi: set ft=ruby :

# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|

  config.vm.box = "gusztavvargadr/windows-11"
  config.vm.box_version = "2302.0.2409"
  config.vm.hostname = "windows-vpn"
  
  ## Enable bridge network
  config.vm.network "public_network"

  # VirtualBox settings
  config.vm.provider "virtualbox" do |vb|
    vb.name = "Windows-vpn"
    vb.memory = 1024
    vb.cpus = 1

    # Display the VirtualBox GUI when booting the machine
    vb.gui = true
  end

  # Provisioning

  ## Add custom Windows settings
  config.vm.provision "shell", path: "src/scripts/ps/WindowsSettings.ps1"
  ## Install Chocolatey
  config.vm.provision "shell", path: "src/scripts/ps/ChocolateyInstall.ps1"
  ## Install Chocolatey packages
  config.vm.provision "shell", path: "src/scripts/ps/ChocolateyInstallPackages.ps1"
  ## Wireguard Install and setup
  config.vm.provision "shell", path: "src/scripts/ps/WireguardInstall.ps1"
  ## Enable traffic forwarding
  config.vm.provision "shell", path: "src/scripts/ps/EnableTrafficForwarding.ps1"
  
end
