[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Writing an Accessible Guix ISO

From: Hunter Jozwiak
Subject: Writing an Accessible Guix ISO
Date: Sun, 07 May 2023 03:50:39 -0400


I have been hacking for quite some time now on the Guix installer, trying to 
get it to run with the espeakup screenreader which I have the module and 
package for in Guix already. Here is what I have managed to come up with thus 
far, after a time.
#+begin_src scheme :eval no
  (define-module (nongnu system install)
    #:use-module (gnu services)
    #:use-module (gnu services ssh)
    #:use-module (gnu services sound)
    #:use-module (gnu services configuration)
    #:use-module (gnu services linux)
    #:use-module (gnu services shepherd)
    #:use-module (guix gexp)
    #:use-module (guix records)
    #:use-module (gnu system)
    #:use-module (gnu system install)
    #:use-module (gnu packages accessibility)
    #:use-module (gnu packages version-control)
    #:use-module (gnu packages vim)
    #:use-module (gnu packages curl)
    #:use-module (gnu packages emacs)
    #:use-module (gnu packages linux)
    #:use-module (gnu packages mtools)
    #:use-module (gnu packages package-management)
    #:use-module (guix)
    #:export (installation-os-accessible))

  (define-configuration/no-serialization espeakup-configuration
     (file-like espeakup)
     "Set the package providing the @code{/bin/espeakup} command.")
      (string "en-US")
      "Set the voice that espeak-ng should use by default."))

  (define (espeakup-shepherd-service config)
    (list (shepherd-service
           (provision '(espeakup))
           (requirement '(user-processes))
           (documentation "Run espeakup, the espeak-ng bridge to speakup.")
               (list #$(file-append (espeakup-configuration-espeakup config)
                     "-V" #$(espeakup-configuration-default-voice config))))
           (stop #~(make-kill-destructor)))))

  (define espeakup-service-type
     (name 'espeakup)
      (list (service-extension
             (const (list "speakup_soft")))))
     (default-value (espeakup-configuration))
      "Configure and run espeakup, a lightweight bridge between espeak-ng and 
  (define installation-os-accessible
     (inherit installation-os)
     ;; Add the 'net.ifnames' argument to prevent network interfaces
     ;; from having really long names.  This can cause an issue with
     ;; wpa_supplicant when you try to connect to a wifi network.
     (kernel-arguments '("quiet" "modprobe.blacklist=radeon" "net.ifnames=0" 
"console=ttyS0,115200" "speakup.synth=soft"))

       ;;; Todo unmute all the audio channels.
       (service alsa-service-type)
       (service espeakup-service-type)
       (modify-services (operating-system-user-services installation-os)
                        (openssh-service-type config =>
                                               (inherit config)
                                               (allow-empty-passwords? #t)
                                               (%auto-start? #t))))))

     ;; Add some extra packages useful for the installation process
      (append (list espeakup git curl stow vim emacs-no-x-toolkit alsa-utils)
              (operating-system-packages installation-os)))))

The main questions I have so far are these:
1. I know that the espeakup service is incomplete and when I was experimenting 
it was perpetually disabled. I have a reference of how it is done in systemd, 
but not sure how to translate it to the correct shepherd things; pointers to 
corrections appreciated (I suspect that the kernel-loader service is a modprobe 
of sorts, not sure how to solve for the sound requirement as yet).
   #+begin_src conf
     Description=Software speech output for Speakup

     ExecStart=@bindir@/espeakup --default-voice=${default_voice}
     ExecReload=kill -HUP $MAINPID

   As an update, I did manage to get espeakup to sort of enable itself with 
herd enable espeakup and I tried herd start espeakup, but nothing fruitful 

2. Is it true that the defaults is to mute all the channels by default, and if 
so how can this be undone? As it stands now, the system has everything muted 
when I run alsamixer and the volumes were all 0.

3. The ssh was meant more as a fail safe in case all else had failed,
and there was no audio to speak of; that and it has been somewhat
invaluable in debugging the system. In practical uses, this will likely
need to be shorn up and locked down again. In the case someone needs to
ssh into the box, is there a way to hijack the installer from an ssh session 
(the code spelunking I have done thus far suggests no, but I might be wrong)?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]