By: Ammar <ammar.nanjiani@gmail.com>
feat(syncthing): declare game-save peers instead of pairing by hand Save sync has never actually run. Every host declared the game-saves folder, but each listed only itself as a device: steammachine -> 1 device (itself) ammars-pc -> 1 device (itself) steamdeck -> 1 device (itself) theoden -> 1 device (itself) Pairing by hand would not have fixed it either. services.syncthing .overrideDevices defaults to true in both the Home Manager and NixOS modules, so any peer added through the web UI is deleted on the next activation. That is what the previous "Devices are paired via web UI" comment was up against. Adds lib/syncthing-hosts.nix holding the four device IDs, keyed by hostname, and consumes it from both call sites: - modules/dendritic/gaming.nix (desktop, steamdeck, steammachine) - hosts/servers/theoden/configuration.nix (NixOS service) Each host filters out its own entry, since Syncthing must not be handed itself as a peer. A new gaming.syncthing.device option names this host's key in that file. It is explicit rather than derived because Home Manager exposes no networking.hostName, and the standalone configurations the workstation hosts use evaluate with nixosConfig = null, so the NixOS hostname is not reachable from there. Sets overrideDevices = false at both call sites. The IDs are derived from each machine's TLS certificate and are therefore per-install, so a reinstalled host gets a new one; declared peers stay enforced while a device re-paired by hand persists. Note the IDs are per-install and cannot be mirrored in terraform the way lib/hosts.nix is. lib/syncthing-hosts.nix documents how to re-read them.