Skip to content

About

Setting up after a fresh install

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

win-provision

Declarative setup for a fresh Windows 11 machine — apps, Developer Mode, a themed PowerShell prompt, and my VS Code config — in roughly one command.

How it works

The heavy lifting is a WinGet Configuration file, .config/configuration.winget: a declarative, idempotent description of the machine. Re-running only changes what isn't already in the desired state.

script.ps1 is a thin wrapper that:

  1. Runs winget configure to install apps and enable Developer Mode.
  2. Applies a few per-user tweaks DSC doesn't cover cleanly (show file extensions, hidden files, multi-monitor taskbar).
  3. Sets up the oh-my-posh prompt + a Nerd Font.
  4. Restores VS Code settings, keybindings and extensions.

Usage

A fresh install has winget + PowerShell but not Git, so you can't clone the repo yet. Bootstrap straight from the web instead — this downloads the repo to %USERPROFILE%\win-provision and runs it:

irm https://raw.githubusercontent.com/fmmendo/win-provision/master/get.ps1 | iex

Machine-wide apps trigger a single UAC prompt up front.

Prefer Git / already have it?
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force -ErrorAction Ignore
winget install Git.Git -e --source winget   # if not already installed
# open a NEW terminal so git is on PATH, then:
git clone https://github.com/fmmendo/win-provision.git
cd win-provision
.\script.ps1

Just the apps

If you only want the declarative bit:

winget configure validate --file .config/configuration.winget   # check it parses
winget configure --file .config/configuration.winget --accept-configuration-agreements

To trim the setup, comment out or delete resources in the .winget file.

Backing up changes

backup.ps1 copies your current VS Code + Windows Terminal config back into the repo and refreshes the extension list:

.\backup.ps1          # write changes, review, commit yourself
.\backup.ps1 -Push    # also commit + push

The active extension list lives in vscode/extensions.txt (regenerated by backup). Curated "maybe" extensions live in vscode/extensions.optional.txt (never auto-written).

To Do

  • Enable Developer Mode
  • Misc Windows tweaks (file extensions, hidden files, taskbar)
  • Install apps (now declarative via winget configure)
  • Install Store apps (WhatsApp via the msstore source)
  • Install VS Code extensions
  • Copy VS Code keybindings and settings
  • Configure oh-my-posh
  • Configurable steps (edit/trim .config/configuration.winget)
  • Modernise terminal/settings.json (still the 2020 v1.4 schema)
  • Optionally express VS Code extensions in the config file too (Microsoft.VSCode.Dsc)

About

Setting up after a fresh install

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages