Files
nixos/modules
Simon Gardling 9250147c36 game-mods: list-merged launchOptions, init mode, writable targets
Three additions on top of the file-replacement scaffolding:

- mode = "init": create-on-first-apply, leave-alone-otherwise. For
  files the application writes back to (configs edited in-game, save
  files). Operator pushes a new template by deleting the target.

- chmod 644 after every copy. shutil.copy2 preserved the source's
  /nix/store mode (0o444), which made dropped DLL configs read-only.
  Apps that wrote back (OptiScaler "Save INI") got EACCES, which in
  OptiScaler's case cascaded into CreateSwapChainForHwnd returning
  E_FAIL and crashed FH5 on launch.

- launchOptions = listOf str. Multiple mods targeting the same
  steamAppId have their lists concatenated (mod-name alphabetical),
  joined with spaces, %command% appended once. Written into Steam's
  per-app block in userdata/<id>/config/localconfig.vdf via vdf
  parse + atomic os.replace. Idempotent.

- X-ConfigHash on the systemd unit so switch-to-configuration switch
  re-runs apply when the manifest changes.
2026-05-03 00:35:49 -04:00
..
2026-04-25 19:20:24 -04:00