This project is a work in progress and I don't want to be responsible for what you do to your computer with it
This project has two primary components: the executor and the configuration library
-
- A small program written in Rust whose goal is to implement a minimal set of primitives for declarativly managing a Windows system.
-
- A collection of expressions written in Dhall that can be composed to allow flexible and extensible declaration
-
The files
winenv-config/system-config.dhall
andwinenv-config/user-config.dhall
contain the base expressions for the system and user environments -
The two powershell scripts in the project root
system-exec.ps1
anduser-exec.ps1
are the entrypoints for instantiating the system and user environments- These scripts will generate a context object containing information about the environment and save it to
winenv-config/system-context.dhall
orwinenv-config/user-context.dhall
- They will then run
tools/wrapper-script.ps1
passing eitherwinenv-config/system-config.dhall
orwinenv-config/user-config.dhall
to be evaluated and instantiated
- These scripts will generate a context object containing information about the environment and save it to
- Windows Registry
- Registry values containing an array of bytes where different subsets of the array control distinct features (See for example)
- Currently there is no declarative granularity smaller than the registry value as a whole
- Registry values containing an array of bytes where different subsets of the array control distinct features (See for example)
-
- Chocolaty packages
- Install & configure Wireguard
- Set computer scoped environment variables
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
- Disable clipboard history
- Scheduled tasks running as admin
- Auto update chocolatey packages?
-
- Set user scoped environment variables
HKEY_CURRENT_USER\Environment
- Set wallpaper
- Set color theme
- Windows Taskbar
- Dock taskbar on right side
- Use small taskbar buttons
- Pinned taskbar apps
- Don't show contacts on the taskbar
- Don't show search on the taskbar
- Start Menu
- Choose which folders appear on Start
- Remove "Documents" & "Pictures"
- Choose which folders appear on Start
- Windows Terminal configuration
%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
- VSCode config & extensions
%APPDATA%\Code\User\settings.json
- Firefox config & extensions
- Default Apps
- Web Browser
- Explorer settings
- Show hidden files
- Display extensions for known file types
- Always use "Details" view
- Quick access links
- AutoHotKey Custom Keyboard Shortcuts
- Clipboard AutoTyper
- Scheduled tasks running as user
- Delete old Downloads
- Facelog
- Set user scoped environment variables
A mostly unorganized dumping ground —
-
IP Addresses in Dhall
-
Powershell Desired State Configuration
- https://www.red-gate.com/simple-talk/sysadmin/powershell/powershell-desired-state-configuration-the-basics/
- https://docs.microsoft.com/en-us/powershell/scripting/dsc/reference/resources/windows/registryresource?view=powershell-7
- https://markgossa.blogspot.com/2017/08/learn-powershell-dsc-part-1.html
- https://github.com/dsccommunity/ComputerManagementDsc
Inspired by NixOS, Home Manager, and PowerShell Desired State Configuration