Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
# Sensitive files - DO NOT COMMIT
# These files may contain passwords, personal data, or secrets
*-personal.json # Personal configuration files
config-personal/ # Personal config directory
config/backup.json # Personal backup configuration
config/restore.json # Personal restore configuration
manifests/ # Backup manifests and reports
backups/ # Local backup artifacts
*.manifest.json # Backup manifest files
*.restore-report.json # Restore report files
*.backup-report.txt # Human-readable backup reports
*.machine.json # Machine-specific exports
# Sensitive files - do not commit
# These files may contain passwords, personal data, or machine-specific values.
*-personal.json
config-personal/
config/backup.json
config/restore.json
apps.json
optional-apps.json
apps-export.json

# Backup manifests and reports
manifests/
backups/
*.manifest.json
*.restore-report.json
*.backup-report.txt
*.machine.json

# Note: autounattend.xml IS committed (passwords left blank, Windows prompts during install)
# Note: autounattend.xml is committed as a template with blank secrets.

# Build outputs
build/
output/
dist/
*.iso # Generated Windows ISOs
*.wim # Windows image files
*.esd # Windows image files
*.iso
*.wim
*.esd

# Temporary files
temp/
Expand All @@ -30,7 +35,7 @@ install.log

# Downloaded tools
oscdimg.exe
Sophia-Script/ # Downloaded Sophia Script (download fresh each time)
Sophia-Script/

# System files
Thumbs.db
Expand All @@ -41,8 +46,3 @@ desktop.ini
*.bak
*.backup
*~

# Personal apps list (keep template, not personal list)
# Your personal app list - don't commit
# Use apps-template.json instead for sharing
apps.json
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ winget export -o apps.json --source winget

**Note:** Only captures apps installed via WinGet.

For personal usage, keep `apps.json` out of git. The repo ships `apps-template.json`, and the backup workflow preserves your personal `apps.json` so it can be restored into the cloned repo after reinstall.
For personal usage, keep `apps.json`, `optional-apps.json`, and `config\backup.json` out of git. The repo ships `apps-template.json`, `optional-apps-template.json`, and `config\backup.template.json`, and the backup workflow preserves your personal files so they can be restored into the cloned repo after reinstall.

If you want a second-stage app list, create `optional-apps.json` alongside `apps.json`. `apps.json` installs automatically during bootstrap, while `optional-apps.json` is offered with a yes/no prompt after first login and can also be installed later from a desktop shortcut.
If you want a second-stage app list, create `optional-apps.json` alongside `apps.json`. Start from `optional-apps-template.json` if you want an example. `apps.json` installs automatically during bootstrap, while `optional-apps.json` is offered with a yes/no prompt after first login and can also be installed later from a desktop shortcut.

### Backup Before Reinstall

Expand All @@ -90,7 +90,7 @@ This backs up:

### 2. Edit Your App List

Open `apps.json` and remove unwanted apps:
Copy `apps-template.json` to `apps.json`, then remove unwanted apps:

```json
{
Expand Down Expand Up @@ -126,7 +126,7 @@ winget import apps.json --accept-package-agreements --accept-source-agreements
Optional apps can use the same manifest format:

```powershell
Copy-Item apps.json optional-apps.json
Copy-Item optional-apps-template.json optional-apps.json
# Then edit optional-apps.json for apps you want to install later
```

Expand Down Expand Up @@ -176,8 +176,8 @@ declarative-windows/
├── CLAUDE.md # Project guidance for Claude Code
├── brainstorm.md # Design discussions
├── apps.json # Auto-installed WinGet package list
├── optional-apps.json # Prompted/later WinGet package list (optional)
├── apps-template.json # Example auto-installed WinGet package list
├── optional-apps-template.json # Example prompted/later WinGet package list
├── Sophia-Preset.ps1 # Custom Sophia Script configuration
├── autounattend.xml # Windows unattended install config
├── bootstrap.ps1 # Main orchestration script
Expand Down
35 changes: 35 additions & 0 deletions optional-apps-template.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "https://aka.ms/winget-packages.schema.2.0.json",
"CreationDate": "2026-03-27T23:43:29.352-00:00",
"Sources": [
{
"Packages": [
{
"PackageIdentifier": "JetBrains.Toolbox"
},
{
"PackageIdentifier": "CPUID.CPU-Z"
},
{
"PackageIdentifier": "REALiX.HWiNFO"
},
{
"PackageIdentifier": "FinalWire.AIDA64.Extreme"
},
{
"PackageIdentifier": "Wagnardsoft.DisplayDriverUninstaller"
},
{
"PackageIdentifier": "WhirlwindFX.SignalRgb"
}
],
"SourceDetails": {
"Argument": "https://cdn.winget.microsoft.com/cache",
"Identifier": "Microsoft.Winget.Source_8wekyb3d8bbwe",
"Name": "winget",
"Type": "Microsoft.PreIndexed.Package"
}
}
],
"WinGetVersion": "1.29.30-preview"
}
1 change: 1 addition & 0 deletions preflight-backup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ function Get-RepoFilesToBackup {

$files = @(
"apps.json",
"optional-apps.json",
"config\backup.json"
)

Expand Down
4 changes: 4 additions & 0 deletions tests/BackupRestore.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ Describe "backup and restore static checks" {
$backupScriptContent | Should -Match "restorePath"
}

It "backs up optional app manifest when present" {
$backupScriptContent | Should -Match "optional-apps\.json"
}

It "restores in merge mode by default" {
$restoreScriptContent | Should -Match 'Merge'
}
Expand Down
Loading