Skip to content

victorfrye/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Windows Dotfiles

Personal dotfiles to bootstrap and configure a Windows development machine

CI Unlicense license

Overview

This repository uses a hybrid approach: a declarative WinGet Configuration file handles package installs, Windows settings, PowerShell modules, and fonts via DSC resources, while a thin bootstrap script handles Git setup, Dev Drive creation, repo cloning, symlinks, and environment variables.

The bootstrap script does the following:

  1. Install and configure Git for Windows
  2. Format a Dev Drive (or detect an existing one)
  3. Clone the dotfiles repository (or fetch latest if it exists)
  4. Apply WinGet Configuration — installs packages, configures Windows settings, and sets up PowerShell modules
  5. Create symlinks from repo files to their system destinations
  6. Deploy one-time config templates (copied only if target doesn't already exist)
  7. Set machine-level environment variables

All operations are idempotent — re-running the script on an already-configured machine safely skips or updates existing installations.

Symlinked Configuration

Configuration files are symlinked from the repo to their system destinations. Edits on disk are automatically reflected in the repository:

Source (repo) Target
files/powershell/profile.ps1 $PROFILE.CurrentUserAllHosts
files/copilot/copilot-instructions.md ~/.copilot/copilot-instructions.md
files/copilot/agents/ ~/.copilot/agents/ (directory)
files/az/config.json ~/.Azure/AzConfig.json
files/githooks/ ~/.githooks (directory)
files/wsl/.wslconfig ~/.wslconfig
files/docker/config.json ~/.docker/config.json

One-Time Config Templates

These files are copied to their targets only if the target doesn't already exist. Tools write runtime state to these files, so they are not symlinked to avoid git noise:

Source (repo) Target
files/copilot/config.json ~/.copilot/config.json
files/copilot/mcp-config.json ~/.copilot/mcp-config.json
files/terminal/settings.json Windows Terminal Preview LocalState

Instructions

Install PowerShell

  1. Install PowerShell via WinGet:

    winget install --exact --id Microsoft.PowerShell.Preview --source winget
  2. Open a PowerShell session for further steps.

Install Windows Subsystem for Linux (aka WSL)

  1. Install WSL directly via the following command:

    wsl --install
  2. Afterwards, you will need to restart the machine before continuing.

Invoke Dotfiles

  1. From an administrative PowerShell session, set execution policy to remote signed and invoke dotfiles installation:

    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine
    Invoke-RestMethod -Uri 'https://raw.githubusercontent.com/victorfrye/dotfiles/main/scripts/Install-Dotfiles.ps1' | Invoke-Expression

    Optionally specify a custom Dev Drive letter (defaults to W):

    $script = Invoke-RestMethod -Uri 'https://raw.githubusercontent.com/victorfrye/dotfiles/main/scripts/Install-Dotfiles.ps1'
    & ([scriptblock]::Create($script)) -DevDriveLetter 'D'

Post-Install — Configure Secrets

After the install script completes, use the Copilot CLI to interactively scaffold your local env.ps1 secrets file (Azure identities, org repos, navigation aliases, etc.):

cd $env:SRC_VFDOT
copilot -i "Help me create my env.ps1 file. This file is dot-sourced by my PowerShell profile to load secrets and org-specific configuration that must not be committed. Read AGENTS.md for the env.ps1 template and expected structure, then interview me to gather my Azure tenant IDs, subscription IDs, app client IDs, company/client org names, repo names, navigation aliases, solution context shortcuts, and any feed tokens or API keys. Generate the complete env.ps1 file when done."

About

⚙️ My Windows dotfiles for quick machine setup

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

 

Contributors