add chocolatey installation module

This commit is contained in:
Baipyrus 2024-11-24 21:14:55 +01:00
parent 3a849a448f
commit d95ba9823d
3 changed files with 28 additions and 0 deletions

View File

@ -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"

10
util/chocolatey.list Normal file
View File

@ -0,0 +1,10 @@
neovim
ripgrep
wget
curl
fd
unzip
gzip
mingw
make
composer

16
util/chocolatey.psm1 Normal file
View File

@ -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'"
}