Stenography

#| file: modules/nixos/desktop/steno.nix
{
  lib,
  config,
  pkgs,
  ...
}:
let
  cfg = config.mjm.desktop;
in
{
  config = lib.mkIf cfg.enable {
    <<config>>
  };
}

This module sets up my desktop machines to support stenogrophy using OpenSteno's Plover.

environment.systemPackages = [ pkgs.plover ];

Plover is a desktop application that translates stenography inputs into typed words.

#| file: packages/plover.nix
{
  oldpkgs,
  symlinkJoin,
  makeBinaryWrapper,
}:

symlinkJoin {
  name = "plover-wrapped";
  paths = [ oldpkgs.plover ];
  nativeBuildInputs = [ makeBinaryWrapper ];
  postBuild = ''
    wrapProgram $out/bin/plover --add-flag --log-level=error
  '';
}

On Linux at least, Plover sets up a log handler that turns log messages into notifications. Unfortunately, Qt seems to generate innocuous warnings for it every time something is clicked in the UI. This is of course really annoying, so my solution for now is to wrap the package so that it only logs error level messages. This avoids the notification spam.

services.udev.packages =
  {
    name = "atreus-rules";
    destination = "/etc/udev/rules.d/70-atreus.rules";
    text = ''
      SUBSYSTEMS=="usb", ATTRS{manufacturer}=="Keyboardio", ATTRS{product}=="Atreus", TAG+="uaccess", TAG+="seat"
    '';
  }
  |> pkgs.writeTextFile
  |> lib.singleton;

The user running Plover needs some special access to devices for it to be able to do its work. This udev rule gives access to my Keyboardio Atreus keyboard to the currently logged-in user. This keyboard is flashed with a firmware that includes a stenography plugin, using the GeminiPR protocol to communicate with Plover via its virtual serial port.

users.users.mjm.extraGroups = [ "uinput" ];

On the other side, to be able to produce the translated keystrokes that form the syllables the stenography chords represent, it needs access to /dev/uinput, which is most easily done via the "uinput" group.

Proxy Information
Original URL
gemini://midna.dev/homelab/modules/nixos/desktop/steno.gmi
Status Code
Success (20)
Meta
text/gemini;lang=en-US
Capsule Response Time
25.482965 milliseconds
Gemini-to-HTML Time
0.158129 milliseconds

This content has been proxied by September (UNKNO).