diff --git a/install_windows.ps1 b/install_windows.ps1 index 2200b8e..6ae4346 100644 --- a/install_windows.ps1 +++ b/install_windows.ps1 @@ -1,9 +1,11 @@ +Import-Module ./util/chocolatey.psm1 Import-Module ./util/windows.psm1 Import-Module ./util/winget.psm1 # (Optionally) Install required Software InstallWinget +InstallChocolatey # Define paths for tools and configurations $dotfilesRepo = "$env:TMP\dotfiles" diff --git a/util/chocolatey.list b/util/chocolatey.list new file mode 100644 index 0000000..3ca5806 --- /dev/null +++ b/util/chocolatey.list @@ -0,0 +1,10 @@ +neovim +ripgrep +wget +curl +fd +unzip +gzip +mingw +make +composer diff --git a/util/chocolatey.psm1 b/util/chocolatey.psm1 new file mode 100644 index 0000000..118ebb5 --- /dev/null +++ b/util/chocolatey.psm1 @@ -0,0 +1,16 @@ +function InstallPackages +{ + choco.exe install (Get-Content ./util/chocolatey.list) +} + +function ChocolateyInstall +{ + $install = Read-Host "Install as Administrator now? [Y/n]" + if ($install.ToLower() -eq 'n') + { return + } + + # Start admin process, import this script, run 'InstallPackages' function + Start-Process powershell.exe -Verb RunAs ` + -ArgumentList "-C", "'Import-Module ./util/chocolatey.psm1; InstallPackages'" +}