Replace Parsec with Sunshine and Moonlight

This commit is contained in:
2026-07-31 23:56:43 +09:00
parent dddb7e07ab
commit 7c66c15da5
20 changed files with 18 additions and 214 deletions
+2 -18
View File
@@ -62,10 +62,6 @@ windows/
│ ├── apply.ps1
│ └── gitconfig
│
├── parsec/
│ ├── apply.ps1
│ └── installer.json
│
└── vscode/
├── apply.ps1
├── settings.json
@@ -136,7 +132,6 @@ dsc config set --file .\configuration.dsc.yaml
& .\applications\chatgpt\apply.ps1
& .\applications\git\apply.ps1
& .\applications\parsec\apply.ps1
& .\applications\vscode\apply.ps1
& .\system\advanced-settings\apply.ps1
& .\system\lock-screen\apply.ps1
@@ -147,8 +142,7 @@ dsc config set --file .\configuration.dsc.yaml
The specialized scripts own the details of their own configuration. The
advanced-settings and privacy scripts request elevation for protected policies
and machine-wide settings. The Parsec installer also requests elevation for its
machine-wide installation; Scoop, other DSC user settings, and application
and machine-wide settings. Scoop, DSC user settings, and application
configuration stay in the normal user process.
## Packages
@@ -173,6 +167,7 @@ The update entry point:
- 1Password
- Visual Studio Code
- Vesktop (`Vencord.Vesktop`)
- Moonlight (`MoonlightGameStreamingProject.Moonlight`)
- 7-Zip
ChatGPT is intentionally not part of this DSC file because its Microsoft Store
@@ -197,17 +192,6 @@ ChatGPT Classic (`9NT1R1C2HH7J`) is intentionally not installed.
WinGet's `APPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE` result is treated as
success because it means the installed ChatGPT version is already current.
### Parsec
Parsec is installed by `applications/parsec/apply.ps1` instead of the WinGet
DSC document. Parsec publishes mutable installer content at a stable URL, which
can temporarily leave the WinGet manifest with a stale SHA256 and make the
entire DSC run fail. The application-local declaration pins the verified file
version, SHA256, and Authenticode signer thumbprint. The script downloads only
when Parsec is absent, verifies all three values, then requests elevation and
runs the official installer for all users. It never bypasses WinGet hash
verification.
7-Zip is intentionally installed with its normal Windows installer through
WinGet rather than as a portable Scoop package, because the normal installer
provides Explorer shell integration.
-94
View File
@@ -1,94 +0,0 @@
$ErrorActionPreference = "Stop"
function Test-ParsecInstalled {
$candidatePaths = @(
(Join-Path $env:ProgramFiles "Parsec\parsecd.exe")
(Join-Path $env:LOCALAPPDATA "Parsec\parsecd.exe")
(Join-Path $env:APPDATA "Parsec\parsecd.exe")
)
if (${env:ProgramFiles(x86)}) {
$candidatePaths += Join-Path ${env:ProgramFiles(x86)} "Parsec\parsecd.exe"
}
if ($candidatePaths | Where-Object { Test-Path -LiteralPath $_ }) {
return $true
}
$uninstallRoots = @(
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*"
"HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"
"HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*"
)
foreach ($root in $uninstallRoots) {
$installedPackage = Get-ItemProperty -Path $root -ErrorAction SilentlyContinue |
Where-Object { $_.DisplayName -like "Parsec*" } |
Select-Object -First 1
if ($installedPackage) {
return $true
}
}
return $false
}
if (Test-ParsecInstalled) {
Write-Host "Parsec is already installed."
return
}
$declarationPath = Join-Path $PSScriptRoot "installer.json"
$declaration = Get-Content -LiteralPath $declarationPath -Raw | ConvertFrom-Json
$installerPath = Join-Path ([System.IO.Path]::GetTempPath()) (
"parsec-{0}.exe" -f [guid]::NewGuid().ToString("N")
)
try {
Write-Host "Downloading the declared Parsec installer..."
Invoke-WebRequest -Uri $declaration.url -OutFile $installerPath -UseBasicParsing
$actualHash = (Get-FileHash -LiteralPath $installerPath -Algorithm SHA256).Hash
if ($actualHash -ne $declaration.sha256) {
throw "Parsec installer SHA256 mismatch. Expected $($declaration.sha256), got $actualHash."
}
$version = (Get-Item -LiteralPath $installerPath).VersionInfo.FileVersion
if ($version -ne $declaration.version) {
throw "Parsec installer version mismatch. Expected $($declaration.version), got $version."
}
$signature = Get-AuthenticodeSignature -LiteralPath $installerPath
if ($signature.Status -ne [System.Management.Automation.SignatureStatus]::Valid) {
throw "Parsec installer signature is not valid: $($signature.StatusMessage)"
}
if ($signature.SignerCertificate.Subject -ne $declaration.signerSubject) {
throw "Parsec installer signer subject does not match the declaration."
}
if ($signature.SignerCertificate.Thumbprint -ne $declaration.signerThumbprint) {
throw "Parsec installer signer thumbprint does not match the declaration."
}
Write-Host "Installing verified Parsec $version for all users..."
$process = Start-Process -FilePath $installerPath `
-ArgumentList $declaration.silentArguments `
-Verb RunAs `
-Wait `
-PassThru
if ($process.ExitCode -notin @(0, 3010)) {
throw "Parsec installer failed with exit code $($process.ExitCode)."
}
if (-not (Test-ParsecInstalled)) {
throw "Parsec installer completed, but the installation could not be verified."
}
Write-Host "Parsec installation is present and verified."
}
finally {
Remove-Item -LiteralPath $installerPath -Force -ErrorAction SilentlyContinue
}
@@ -1,13 +0,0 @@
{
"version": "150.104.1.0",
"url": "https://builds.parsec.app/package/parsec-windows.exe",
"sha256": "B8A9CD519010666DEF0EF6E119EB42B33B5B811216F34E4F6C8E2E25AC290FBC",
"signerSubject": "CN=Unity Technologies SF, O=Unity Technologies SF, L=San Francisco, S=California, C=US",
"signerThumbprint": "F83EAE671EDFDE1E819B41FF6F6A2ED611A651DF",
"silentArguments": [
"/silent",
"/norun",
"/nocleanuser",
"/allusers"
]
}
-8
View File
@@ -1,41 +1,33 @@
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: WinGet packages
type: Microsoft.DSC/Include
properties:
configurationFile: packages/winget.dsc.yaml
- name: Taskbar
type: Microsoft.DSC/Include
properties:
configurationFile: system/taskbar.dsc.yaml
- name: Personalization
type: Microsoft.DSC/Include
properties:
configurationFile: system/personalization.dsc.yaml
- name: Start
type: Microsoft.DSC/Include
properties:
configurationFile: system/start.dsc.yaml
- name: Device usage
type: Microsoft.DSC/Include
properties:
configurationFile: system/device-usage.dsc.yaml
- name: Explorer
type: Microsoft.DSC/Include
properties:
configurationFile: system/explorer.dsc.yaml
- name: Advanced settings
type: Microsoft.DSC/Include
properties:
configurationFile: system/advanced-settings/configuration.dsc.yaml
- name: Microsoft IME
type: Microsoft.DSC/Include
properties:
+6 -5
View File
@@ -1,5 +1,4 @@
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Google Chrome
type: Microsoft.WinGet/Package
@@ -7,28 +6,30 @@ resources:
id: Google.Chrome
source: winget
useLatest: true
- name: 1Password
type: Microsoft.WinGet/Package
properties:
id: AgileBits.1Password
source: winget
useLatest: true
- name: Visual Studio Code
type: Microsoft.WinGet/Package
properties:
id: Microsoft.VisualStudioCode
source: winget
useLatest: true
- name: Vesktop
type: Microsoft.WinGet/Package
properties:
id: Vencord.Vesktop
source: winget
useLatest: true
- name: Moonlight
type: Microsoft.WinGet/Package
properties:
id: MoonlightGameStreamingProject.Moonlight
source: winget
useLatest: true
- name: 7-Zip
type: Microsoft.WinGet/Package
properties:
@@ -1,5 +1,4 @@
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Enable End task from the taskbar
type: Microsoft.Windows/Registry
@@ -9,7 +8,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Enable clipboard history
type: Microsoft.Windows/Registry
properties:
-14
View File
@@ -1,5 +1,4 @@
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Disable development usage
type: Microsoft.Windows/Registry
@@ -9,7 +8,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Clear development priority
type: Microsoft.Windows/Registry
properties:
@@ -18,7 +16,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable gaming usage
type: Microsoft.Windows/Registry
properties:
@@ -27,7 +24,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Clear gaming priority
type: Microsoft.Windows/Registry
properties:
@@ -36,7 +32,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable family usage
type: Microsoft.Windows/Registry
properties:
@@ -45,7 +40,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Clear family priority
type: Microsoft.Windows/Registry
properties:
@@ -54,7 +48,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable creativity usage
type: Microsoft.Windows/Registry
properties:
@@ -63,7 +56,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Clear creativity priority
type: Microsoft.Windows/Registry
properties:
@@ -72,7 +64,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable school usage
type: Microsoft.Windows/Registry
properties:
@@ -81,7 +72,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Clear school priority
type: Microsoft.Windows/Registry
properties:
@@ -90,7 +80,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable entertainment usage
type: Microsoft.Windows/Registry
properties:
@@ -99,7 +88,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Clear entertainment priority
type: Microsoft.Windows/Registry
properties:
@@ -108,7 +96,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable business usage
type: Microsoft.Windows/Registry
properties:
@@ -117,7 +104,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Clear business priority
type: Microsoft.Windows/Registry
properties:
-5
View File
@@ -1,5 +1,4 @@
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Show file extensions
type: Microsoft.Windows/Registry
@@ -9,7 +8,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Show hidden files
type: Microsoft.Windows/Registry
properties:
@@ -18,7 +16,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Show protected operating system files
type: Microsoft.Windows/Registry
properties:
@@ -27,7 +24,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Show full path in title bar
type: Microsoft.Windows/Registry
properties:
@@ -36,7 +32,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Show empty drives
type: Microsoft.Windows/Registry
properties:
-3
View File
@@ -1,5 +1,4 @@
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: IME Key Assignment
type: Microsoft.Windows/Registry
@@ -9,7 +8,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Muhenkan IME Off
type: Microsoft.Windows/Registry
properties:
@@ -18,7 +16,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Henkan IME On
type: Microsoft.Windows/Registry
properties:
-8
View File
@@ -1,5 +1,4 @@
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Use dark app mode
type: Microsoft.Windows/Registry
@@ -9,7 +8,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Use dark Windows mode
type: Microsoft.Windows/Registry
properties:
@@ -18,7 +16,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Choose accent color automatically
type: Microsoft.Windows/Registry
properties:
@@ -27,7 +24,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Disable rotating lock screen
type: Microsoft.Windows/Registry
properties:
@@ -36,7 +32,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable lock screen facts and tips
type: Microsoft.Windows/Registry
properties:
@@ -45,7 +40,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable lock screen slideshow
type: Microsoft.Windows/Registry
properties:
@@ -54,7 +48,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Do not automatically select lock screen widgets
type: Microsoft.Windows/Registry
properties:
@@ -63,7 +56,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Clear selected lock screen status
type: Microsoft.Windows/Registry
properties:
@@ -1,5 +1,4 @@
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Disable advertising ID
type: Microsoft.Windows/Registry
@@ -9,7 +8,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Do not share the language list with websites
type: Microsoft.Windows/Registry
properties:
@@ -18,7 +16,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Disable personalized offers
type: Microsoft.Windows/Registry
properties:
@@ -27,7 +24,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable tailored experiences by policy
type: Microsoft.Windows/Registry
properties:
@@ -36,7 +32,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Disable all Windows Spotlight suggestions
type: Microsoft.Windows/Registry
properties:
@@ -45,7 +40,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Disable third-party Spotlight suggestions
type: Microsoft.Windows/Registry
properties:
@@ -54,7 +48,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Disable suggested content in Settings
type: Microsoft.Windows/Registry
properties:
@@ -63,7 +56,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable Settings suggestions
type: Microsoft.Windows/Registry
properties:
@@ -72,7 +64,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable Settings account suggestions
type: Microsoft.Windows/Registry
properties:
@@ -81,7 +72,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable Settings app suggestions
type: Microsoft.Windows/Registry
properties:
@@ -90,7 +80,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable tips about Windows
type: Microsoft.Windows/Registry
properties:
@@ -99,7 +88,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable Windows welcome experience
type: Microsoft.Windows/Registry
properties:
@@ -108,7 +96,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable suggested apps
type: Microsoft.Windows/Registry
properties:
@@ -117,7 +104,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable soft-landing tips
type: Microsoft.Windows/Registry
properties:
@@ -126,7 +112,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable automatic suggested app installation
type: Microsoft.Windows/Registry
properties:
@@ -135,7 +120,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable device setup suggestions
type: Microsoft.Windows/Registry
properties:
@@ -144,7 +128,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable File Explorer sync-provider promotions
type: Microsoft.Windows/Registry
properties:
@@ -153,7 +136,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable inking and typing diagnostics
type: Microsoft.Windows/Registry
properties:
@@ -162,7 +144,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Set feedback frequency period to never
type: Microsoft.Windows/Registry
properties:
@@ -171,7 +152,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Set feedback prompts to never
type: Microsoft.Windows/Registry
properties:
@@ -180,7 +160,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable device search history
type: Microsoft.Windows/Registry
properties:
@@ -189,7 +168,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable search highlights
type: Microsoft.Windows/Registry
properties:
-10
View File
@@ -1,5 +1,4 @@
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Disable advertising ID by policy
type: Microsoft.Windows/Registry
@@ -9,7 +8,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Disable Windows consumer experiences
type: Microsoft.Windows/Registry
properties:
@@ -18,7 +16,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Set diagnostic data to the lowest available level
type: Microsoft.Windows/Registry
properties:
@@ -27,7 +24,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable feedback notifications
type: Microsoft.Windows/Registry
properties:
@@ -36,7 +32,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Disable Diagnostic Data Viewer
type: Microsoft.Windows/Registry
properties:
@@ -45,7 +40,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Limit diagnostic log collection
type: Microsoft.Windows/Registry
properties:
@@ -54,7 +48,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Limit diagnostic dump collection
type: Microsoft.Windows/Registry
properties:
@@ -63,7 +56,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Disable activity feed
type: Microsoft.Windows/Registry
properties:
@@ -72,7 +64,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable publishing user activity
type: Microsoft.Windows/Registry
properties:
@@ -81,7 +72,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable uploading user activity
type: Microsoft.Windows/Registry
properties:
-4
View File
@@ -1,5 +1,4 @@
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Show recently added apps
type: Microsoft.Windows/Registry
@@ -9,7 +8,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Hide recommended and recent files
type: Microsoft.Windows/Registry
properties:
@@ -18,7 +16,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Hide recommendations for tips and new apps
type: Microsoft.Windows/Registry
properties:
@@ -27,7 +24,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Disable app launch tracking
type: Microsoft.Windows/Registry
properties:
-4
View File
@@ -1,5 +1,4 @@
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Taskbar Widgets
type: Microsoft.Windows/Registry
@@ -9,7 +8,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Taskbar Resume
type: Microsoft.Windows/Registry
properties:
@@ -18,7 +16,6 @@ resources:
valueData:
DWord: 0
_exist: true
- name: Taskbar Search
type: Microsoft.Windows/Registry
properties:
@@ -27,7 +24,6 @@ resources:
valueData:
DWord: 1
_exist: true
- name: Taskbar Alignment
type: Microsoft.Windows/Registry
properties:
-1
View File
@@ -15,7 +15,6 @@ try {
& .\applications\chatgpt\apply.ps1
& .\applications\git\apply.ps1
& .\applications\parsec\apply.ps1
& .\applications\vscode\apply.ps1
& .\system\advanced-settings\apply.ps1
& .\system\lock-screen\apply.ps1