vmix.nix/lib/images/windows/templates
Git Sagar f7405b8e70 generalize: keepMachineSid, for a profile that survives an OS rebuild
sysprep /generalize regenerates the machine SID on every build, so an account
built by one image does not match a profile left on a persistent disk by an
earlier one -- different SID, so file ACLs, the NTUSER.DAT hive and ProfileList
all mismatch, and the profile will not load.

keepMachineSid drops /generalize and uses /oobe alone. The SID is then
inherited from the cached base install derivation, which is content-addressed
and so identical across every rebuild of the layers above it; the account,
always RID 1000, comes out the same each time. A profile kept on a data disk
then matches exactly, with no ownership or ProfileList fixups.

Without /generalize the specialize pass does not run, so the profile relocation
cannot ride the unattend there. It is written to the registry offline instead,
before the build's OOBE, which virt-win-reg applies ahead of the Audit Mode
boot. And because /generalize is also what strips MountedDevices, dropping it
means the data disk keeps its drive letter into the shipped image -- the
letterless-first-boot race that sent profiles temporary goes away at the root.

Default is unchanged (/generalize), correct for an image deployed to many
hosts; keepMachineSid is for an image that is always the same one machine.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117qMyjpuXsjpVAcpJbFD8g
2026-09-10 20:05:27 -03:00
..
apps office install pt-br additional language 2026-05-25 11:52:31 -03:00
essentials vmix run command, virtio-drivers template, delay-oobe-run flag 2026-05-23 23:06:28 -03:00
registry add enableRDP flag to generalize and fix AutoLogon 2026-06-07 15:57:17 +05:30
default-apps.nix sync with labv2.nix + standalone flake with toDisk app 2026-05-23 19:18:10 -03:00
default.nix laptop image tiers, devshell, partition preserve, cleanup 2026-05-24 13:32:18 -03:00
generalize.nix generalize: keepMachineSid, for a profile that survives an OS rebuild 2026-09-10 20:05:27 -03:00