Hey folks, I’m a blind screen reader user and have been enjoying NixOS on my media PC for a while now. I’d like to install it in more places, and have attempted to create accessible installation media, but it won’t boot and I can’t figure out why. Non-booting VMs (or non-booting machines of any kind) can be tricky for me to debug because generally the screen reader isn’t available at that point, but I’m hoping my mistake is something simple.
First I created this module to support easier enabling/configuration of espeakup:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.espeakup;
inherit (lib)
mkEnableOption
mkIf
mkPackageOption
mkOption
types
;
in
{
options.services.espeakup = {
enable = mkEnableOption "Espeakup screen reader";
package = mkPackageOption pkgs "espeakup" { };
defaultVoice = mkOption {
type = types.str;
default = "en-gb";
description = "Default voice for espeakup";
};
};
config = mkIf cfg.enable {
boot.kernelModules = [ "speakup_soft" ];
systemd.packages = [ pkgs.espeakup ];
systemd.services.espeakup = {
wantedBy = [ "sound.target" ];
environment = {
default_voice = cfg.defaultVoice;
};
serviceConfig = {
ExecStartPre = "";
};
};
};
}
This works on the media PC and gives me speech at the console when I’m not in GNOME. Now I want to bake it into a minimal installer. I used this guide and created this configuration, enabling the new espeakup module plus adding in avahi and enabling SSH so maybe I can more easily find the newly-booted device on my network:
{ config, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
# Provide an initial copy of the NixOS channel so that the user
# doesn't need to run "nix-channel --update" first.
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
./espeakup.nix
];
sound.enable = true;
services.espeakup.enable = true;
systemd.services.sshd.wantedBy = pkgs.lib.mkForce [ "multi-user.target" ];
users.users.root.openssh.authorizedKeys.keys = [
"SSH"
];
services.avahi.enable = true;
}
I then boot this like so:
qemu-system-x86_64 -nographic -m 2048 -cdrom result/iso/nixos-*.iso
After the initial boot screen, this just gives me a blank screen, and I can’t tell if that’s because -nographic
isn’t picking something up, I need to include a more fully-baked kernel, or what.
Any help figuring out what I’m missing here would be great. Thanks a bunch.