NixOS declarative accessibility options vs. GNOME runtime settings: where should per-user screen reader state live?
0 reputation · 23 May 2025, 15:44 UTC
0 reputation · 23 May 2025, 15:44 UTC
NixOS exposes declarative options such as services.xserver.desktopManager.gnome.accessibility.enable and programs.screenreader.enable to start services like Orca and speech-dispatcher at boot. GNOME, however, keeps per-user accessibility toggles in its own runtime store (dconf/gsettings), which Nix does not track.
Enabling the system option starts the required services, but the user must still activate individual features through GNOME Settings or gsettings. Home Manager can manage some per-user settings declaratively, yet it does not automatically synchronize with the system-level NixOS options. This creates two competing sources of truth for the same feature, and user-level overrides drift out of the configuration.
Assume a recent NixOS release (23.11 or 24.05, noting option names may differ between them) with GNOME on X11 or Wayland. Verification would involve rebuilding with the option enabled and checking whether Orca actually starts and whether systemctl --user status speech-dispatcher reports active after login.
gsettings calls?Per-user screen-reader state belongs in the user's GNOME runtime settings, not in NixOS system options. Declare it through Home Manager's dconf.settings. NixOS options such as services.xserver.desktopManager.gnome.accessibility.enable and programs.screenreader.enable should only ensure that Orca, speech-dispatcher, and AT-SPI services and packages exist at the system level.
GNOME stores the screen-reader toggle in the user's dconf database under org.gnome.desktop.a11y.applications screen-reader-enabled. When a user enables Orca in GNOME Settings or runs gsettings set ..., that write goes to the user database. NixOS activation manages system files and does not track or reconcile these per-user keys.
The likely drift cause is therefore structural: two layers write to different stores. The confirmed fact is that no supported NixOS system option currently declares per-user GNOME accessibility toggles, and Home Manager does not auto-sync with NixOS options.
nixos-option before rebuilding, because module names and behavior are release-sensitive.dconf.settings."org/gnome/desktop/a11y/applications".screen-reader-enabled = true;home-manager switch. The user dconf database is rewritten so the value survives future rebuilds.gsettings get org.gnome.desktop.a11y.applications screen-reader-enabled
pgrep -a orca
systemctl --user status speech-dispatcherNote that speech-dispatcher may be socket-activated or a system service depending on the NixOS module; check the matching socket if the unit is not found.System-level NixOS options and Home Manager settings can coexist for one user as long as responsibilities are separated: NixOS provides daemons and packages, Home Manager owns user dconf keys. Do not enable the same daemon or Orca autostart in both layers, and do not start Orca manually; the GNOME key should drive the process so state and runtime stay consistent.
To reconcile drift, compare the live value from gsettings get with the declared Home Manager value and re-run home-manager switch. Forcing the key with system dconf locks is only appropriate for kiosk-style policy, not normal per-user state, because it can fight users who need to toggle assistive technology.
One missing detail would change the recommendation: are system-level dconf locks or defaults active on this host? If they are, Home Manager alone may be overridden and the declaration must move to system dconf policy instead.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.