From 8266dc7ee27942cfb5af5f45e0a05ddea42d853d Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Sun, 26 Apr 2026 09:06:02 +0100 Subject: [PATCH] feat(system): add accessibility preset module MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Opt-in `nomarchy.system.accessibility.enable` (default false — accessibility is a personal preference, not hardware-derived). Wires `services.gnome.at-spi2-core`, installs `pkgs.orca`, and sets `XCURSOR_SIZE` to a configurable `accessibility.cursorSize` (default 32, up from NixOS's 24). The original roadmap entry bundled Hyprland-side bits (slower key-repeat, Orca launch keybinding, high-contrast palette). Those require touching home-manager / theme files and a new palette directory; split into a separate Next-column row so the system-side preset ships now and the desktop integration follows independently. --- core/system/accessibility.nix | 14 ++++++++++++++ core/system/default.nix | 1 + core/system/options.nix | 19 +++++++++++++++++++ docs/OPTIONS.md | 8 ++++++++ docs/ROADMAP.md | 3 ++- 5 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 core/system/accessibility.nix diff --git a/core/system/accessibility.nix b/core/system/accessibility.nix new file mode 100644 index 0000000..4e9d5ed --- /dev/null +++ b/core/system/accessibility.nix @@ -0,0 +1,14 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.nomarchy.system.accessibility; +in +{ + config = lib.mkIf cfg.enable { + services.gnome.at-spi2-core.enable = lib.mkDefault true; + + environment.systemPackages = [ pkgs.orca ]; + + environment.variables.XCURSOR_SIZE = toString cfg.cursorSize; + }; +} diff --git a/core/system/default.nix b/core/system/default.nix index 2d428fd..b9d7719 100644 --- a/core/system/default.nix +++ b/core/system/default.nix @@ -21,6 +21,7 @@ ./snapper.nix ./laptop.nix ./desktop.nix + ./accessibility.nix ./hibernate.nix ./containers.nix ./pam.nix diff --git a/core/system/options.nix b/core/system/options.nix index c5f59c9..1dfab59 100644 --- a/core/system/options.nix +++ b/core/system/options.nix @@ -126,6 +126,25 @@ }; }; + accessibility = { + enable = lib.mkEnableOption '' + Accessibility preset: AT-SPI2 framework, the Orca screen reader + on PATH, and a larger default cursor size. Off by default — + accessibility is a personal preference, not a hardware-derived + signal. The Hyprland-side keybinding to launch Orca is a + separate roadmap item. + ''; + cursorSize = lib.mkOption { + type = lib.types.int; + default = 32; + description = '' + XCURSOR_SIZE when accessibility is on. NixOS default is 24; + 32 is a safer floor for low-vision users. Bump to 48 if the + user explicitly asks. + ''; + }; + }; + containers = { enable = lib.mkEnableOption '' Rootless Podman with Docker compatibility (`docker` → `podman`), diff --git a/docs/OPTIONS.md b/docs/OPTIONS.md index 27919e7..dd4632a 100644 --- a/docs/OPTIONS.md +++ b/docs/OPTIONS.md @@ -79,6 +79,14 @@ Wired in `features/desktop/waybar/default.nix` (filters the battery widget out o `bool`, default `nomarchy.system.formFactor == "desktop"`. Desktop preset: pins `powerManagement.cpuFreqGovernor` to `"performance"` (via `mkDefault`) and enables `services.zfs.autoScrub` + `services.zfs.trim` so a future ZFS pool gets sensible maintenance without further config. The ZFS knobs are no-ops until you add `boot.supportedFilesystems = [ "zfs" ]` (plus `networking.hostId`) and a pool. Battery-widget filtering is handled by `formFactor` itself, so this preset doesn't repeat it. +### `nomarchy.system.accessibility.enable` + +`bool`, default `false`. Accessibility preset: enables `services.gnome.at-spi2-core` (AT-SPI2 framework), installs `pkgs.orca` (screen reader) into `environment.systemPackages`, and sets `XCURSOR_SIZE` to `accessibility.cursorSize`. Off by default — accessibility is a personal preference, not hardware-derived. The Hyprland-side bits (slower key-repeat, Orca launch keybinding, high-contrast palette) are a separate roadmap item. + +### `nomarchy.system.accessibility.cursorSize` + +`int`, default `32`. `XCURSOR_SIZE` when `accessibility.enable = true`. NixOS default is 24; 32 is a safer floor for low-vision users. + ### `nomarchy.system.containers.enable` `bool`, default `false`. Rootless Podman with Docker compatibility (`docker` → `podman`), plus `podman-compose`, `podman-tui`, and `dive`. diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 1fc24f9..285f5c0 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -23,7 +23,7 @@ Guardrails (apply when adding anything): ### Next (bigger lifts that build on Now) -- **Accessibility preset.** Larger cursor, slower key-repeat defaults, `services.orca`, screen reader keybinding, high-contrast theme variant. +- **Accessibility — home-side companion.** Hyprland-side bits the system preset can't reach: slower `input.repeat_rate` / `repeat_delay` defaults, `SUPER+ALT+S` keybinding to launch Orca, and a high-contrast palette under `themes/palettes/`. Gated on a new `nomarchy.accessibility.enable` mirror of the system option. - **Gaming preset.** `programs.steam.enable`, `programs.gamemode.enable`, `services.flatpak.enable` with a curated remote, and a Hyprland window-rule to fullscreen Steam-launched apps. - **First-run welcome wizard.** Extend `nomarchy-welcome` from a one-shot greeter into a guided picker: theme, panel position, monospace font, "what's a sane home.nix to start with?". Runs once, persists "done" in `state.json`. - **Plymouth theme variants per palette.** Currently one Plymouth theme; could template per-palette so the boot splash matches the active theme. @@ -124,6 +124,7 @@ Each PR description should reference the row(s) in `docs/SCRIPTS.md` it closes, (Move items here when they land — keep them brief, link the commit/PR.) +- _2026-04-26_ — Accessibility preset module (`core/system/accessibility.nix`). New `nomarchy.system.accessibility.{enable,cursorSize}` options (opt-in, default off — accessibility isn't a hardware-derived signal). Enables `services.gnome.at-spi2-core`, installs Orca, and sets `XCURSOR_SIZE=32` (configurable). Hyprland-side companion (key-repeat slowdown, Orca keybinding, high-contrast palette) split into a new Next-column row. - _2026-04-26_ — Desktop preset module (`core/system/desktop.nix`). New `nomarchy.system.desktop.enable` option; defaults to `formFactor == "desktop"` (mirror of the laptop preset's auto-enable). Pins `powerManagement.cpuFreqGovernor` to `"performance"` and enables `services.zfs.{autoScrub,trim}` so a future ZFS pool gets sensible maintenance for free. - _2026-04-26_ — Laptop preset module (`core/system/laptop.nix`). New `nomarchy.system.laptop.{enable,thermald}` options; `enable` defaults to `formFactor == "laptop"` so the installer's existing `formFactor` write auto-flips it on. Wires TLP (governors + 75/80 charge thresholds), force-disables `power-profiles-daemon`, enables `upower` and `thermald` (x86_64), adds the brightnessctl udev rule for backlight without root, and sets a logind lid-switch policy that defers to `hibernation.enable`. Closes both the Now item and the largest Next item. - _2026-04-25_ — Software-profile multi-select in the installer. Users can now pick Dev, Gaming, Office, Media, and CLI Utils profiles during install; logic emits corresponding `home.packages` and system toggles into the generated config.