-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.ps1
64 lines (55 loc) · 2.93 KB
/
setup.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Install applications.
write-host "Installing applications" -ForegroundColor "Yellow"
winget install -e --id Microsoft.WindowsTerminal -s winget
winget install -e --id Git.Git -s winget
winget install -e --id jqlang.jq -s winget
winget install -e --id Microsoft.PowerShell -s winget
winget install -e --id JanDeDobbeleer.OhMyPosh -s winget
winget install -e --id Microsoft.VisualStudioCode -s winget
winget install -e --id CoreyButler.NVMforWindows -s winget
winget install -e --id Amazon.AWSCLI -s winget
winget install -e --id GitHub.cli -s winget
winget install -e --id Microsoft.PowerToys -s winget
winget install -e --id JetBrains.Rider -s winget
winget install -e --id GIMP.GIMP -s winget
winget install -e --id Inkscape.Inkscape -s winget
# Install modules.
write-host "Installing PowerShell modules" -ForegroundColor "Yellow"
install-module posh-git -Scope CurrentUser
# Refresh path
$env:NVM_HOME = [System.Environment]::GetEnvironmentVariable("NVM_HOME", "Machine")
$env:NVM_SYMLINK = [System.Environment]::GetEnvironmentVariable("NVM_SYMLINK", "Machine")
$env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
# Install node.
write-host "Installing latest version of Node (nvm)" -ForegroundColor "Yellow"
nvm install latest
nvm use latest
# Install nerd fonts.
write-host "Installing Meslo font family (oh-my-posh)" -ForegroundColor "Yellow"
oh-my-posh font install Meslo
# Install vscode extensions.
write-host "Installing Visual Studio Code extensions" -ForegroundColor "Yellow"
code --force --install-extension editorconfig.editorconfig
code --force --install-extension ms-vscode.powershell
code --force --install-extension dbaeumer.vscode-eslint
code --force --install-extension leizongmin.node-module-intellisense
code --force --install-extension vscode-icons-team.vscode-icons
code --force --install-extension octref.vetur
# Install Ubuntu
write-host "Installing Ubuntu (WSL)" -ForegroundColor "Yellow"
wsl --install -d Ubuntu
# Copy configuration.
write-host "Placing configuration files" -ForegroundColor "Yellow"
copy $PSScriptRoot\.editorconfig $env:USERPROFILE\.editorconfig
copy $PSScriptRoot\.gitconfig $env:USERPROFILE\.gitconfig
copy $PSScriptRoot\oh-my-posh.json $env:USERPROFILE\oh-my-posh.json
copy $PSScriptRoot\vscode.json $env:APPDATA\Code\User\settings.json
copy $PSScriptRoot\github-cli.yml $env:APPDATA\GitHub CLI\config.yml
copy $PSScriptRoot\windows-terminal.json $env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
# Copy Powershell 7 profile.
write-host "Creating PowerShell profile" -ForegroundColor "Yellow"
md $env:USERPROFILE\Documents\Powershell\ -ea 0
copy $PSScriptRoot\profile.ps1 $env:USERPROFILE\Documents\Powershell\Microsoft.PowerShell_profile.ps1
# Configure Windows.
write-host "Configuring Windows" -ForegroundColor "Yellow"
& $PSScriptRoot\windows.ps1