vmix.nix/lib
Git Sagar 60013006d6 generalize: folderRedirect -- keep the SID generalized, persist user data on D:
The alternative to keepMachineSid for "survives an OS rebuild". Instead of
moving the whole SID-bound profile to D: (which forces a fixed SID), keep
/generalize -- so every machine and every rebuild gets its own random SID --
and redirect only the user's data folders (Desktop, Documents, Downloads, ...)
to the persistent data volume. Files survive a rebuild; per-user registry
settings do not, which is the accepted trade for not touching the SID.

Three pieces. A per-user script calls SHSetKnownFolderPath to point each known
folder at D:\UserData\<folder>; it is registered through Active Setup, which
runs it once per profile at first logon -- including the fresh profile each
generalized rebuild creates. And the onstart SYSTEM boot script grants the
well-known Users group inheritable full control on the data tree, so the
account behind whatever SID this rebuild produced can reach files an earlier
SID created.

The heal/relocation path is now gated on profilesDirectory, so it and
folderRedirect stay mutually exclusive and neither breaks the other's null.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0117qMyjpuXsjpVAcpJbFD8g
2026-09-13 06:44:08 -03:00
..
images generalize: folderRedirect -- keep the SID generalized, persist user data on D: 2026-09-13 06:44:08 -03:00
default.nix sync with labv2.nix + standalone flake with toDisk app 2026-05-23 19:18:10 -03:00
network.nix sync with labv2.nix + standalone flake with toDisk app 2026-05-23 19:18:10 -03:00